Click here to Skip to main content
15,914,222 members
Home / Discussions / C#
   

C#

 
GeneralRe: Getting rid of unwished Systemsounds Pin
Hmitosh13-Dec-04 5:09
Hmitosh13-Dec-04 5:09 
GeneralRe: Getting rid of unwished Systemsounds Pin
Skynyrd13-Dec-04 5:55
Skynyrd13-Dec-04 5:55 
Generalquery a crystal report Pin
steve_rm11-Dec-04 5:41
steve_rm11-Dec-04 5:41 
GeneralC# Reference Pin
nagajim11-Dec-04 2:57
nagajim11-Dec-04 2:57 
GeneralRe: C# Reference Pin
Nick Parker11-Dec-04 18:19
protectorNick Parker11-Dec-04 18:19 
GeneralSetting the toolbar's background transparented Pin
yyylny11-Dec-04 1:25
yyylny11-Dec-04 1:25 
GeneralRe: Setting the toolbar's background transparented Pin
lj_rules12-Dec-04 20:51
lj_rules12-Dec-04 20:51 
GeneralRe: Setting the toolbar's background transparented Pin
yyylny13-Dec-04 3:50
yyylny13-Dec-04 3:50 
Generalchanging a DateTime to dd/mm/yyyy Pin
steve_rm10-Dec-04 23:10
steve_rm10-Dec-04 23:10 
GeneralRe: changing a DateTime to dd/mm/yyyy Pin
Atal Upadhyay11-Dec-04 0:45
Atal Upadhyay11-Dec-04 0:45 
Generaluneable to sort my listview Pin
michael.wikstrom10-Dec-04 21:22
michael.wikstrom10-Dec-04 21:22 
GeneralRe: uneable to sort my listview Pin
Daniel Turini11-Dec-04 21:21
Daniel Turini11-Dec-04 21:21 
GeneralWin2k Socket Security Exception Pin
Tristan Rhodes10-Dec-04 21:10
Tristan Rhodes10-Dec-04 21:10 
QuestionDuplicated items in watch window ? Pin
sachinkalse10-Dec-04 18:23
sachinkalse10-Dec-04 18:23 
AnswerRe: Duplicated items in watch window ? Pin
Heath Stewart10-Dec-04 20:55
protectorHeath Stewart10-Dec-04 20:55 
GeneralBeta 2.0 limitations Pin
Yaakov Davis10-Dec-04 17:46
Yaakov Davis10-Dec-04 17:46 
GeneralRe: Beta 2.0 limitations Pin
Heath Stewart10-Dec-04 20:46
protectorHeath Stewart10-Dec-04 20:46 
GeneralRe: Beta 2.0 limitations Pin
Yaakov Davis10-Dec-04 22:22
Yaakov Davis10-Dec-04 22:22 
QuestionHow to Create static Enum like ConnectionState Pin
trevor_ledet10-Dec-04 15:21
trevor_ledet10-Dec-04 15:21 
AnswerRe: How to Create static Enum like ConnectionState Pin
Heath Stewart10-Dec-04 20:51
protectorHeath Stewart10-Dec-04 20:51 
I'm not sure I understand what you're asking, but you don't have to reference an enum through an object: in fact, System.Data.ConnectionState.Open includes no objects - only the namespace (System.Data), then the enum (ConnectionState), and finally the enum member (Open). It isn't like many C/C++ enums that are just #defines.

You declare an enum like so:
public enum MyEnum
{
  One,
  Two,
  Three
}
You can also assign specific values to each. If you want to use a flagged enumeration (so you can use bitwise operators on the enum members), attribute it with the FlagsAttribute and - to following naming guidelines to be consistent with the base class library (BCL) - make the enum plural:
[Flags]
public enum MyEnums
{
  One = 1,
  Two = 2,
  Four = 4
}
For more information about this, I highly suggest you read about the Visual C# Language[^], especially the Visual C# Language Specification[^].

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: How to Create static Enum like ConnectionState Pin
trevor_ledet11-Dec-04 5:52
trevor_ledet11-Dec-04 5:52 
GeneralMOVING CHILD WINDOWS IN MDI Pin
Tyrus18210-Dec-04 15:19
Tyrus18210-Dec-04 15:19 
GeneralRe: MOVING CHILD WINDOWS IN MDI Pin
Skynyrd10-Dec-04 16:28
Skynyrd10-Dec-04 16:28 
GeneralRe: MOVING CHILD WINDOWS IN MDI Pin
Tyrus18210-Dec-04 17:03
Tyrus18210-Dec-04 17:03 
GeneralRe: MOVING CHILD WINDOWS IN MDI Pin
Skynyrd10-Dec-04 17:07
Skynyrd10-Dec-04 17:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.