Click here to Skip to main content
15,921,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to click a button in a program Pin
sduhd20-Nov-07 19:45
sduhd20-Nov-07 19:45 
QuestionTreeView and SelectedNode (Snap To Node after Expand All) Pin
Jeffrey Walton20-Nov-07 16:22
Jeffrey Walton20-Nov-07 16:22 
QuestionDataadapter Pin
Assaf8220-Nov-07 15:35
Assaf8220-Nov-07 15:35 
AnswerRe: Dataadapter Pin
KennyPatel20-Nov-07 19:03
KennyPatel20-Nov-07 19:03 
QuestionGridview Pin
mojojojojo20-Nov-07 15:33
mojojojojo20-Nov-07 15:33 
AnswerRe: Gridview Pin
KennyPatel20-Nov-07 19:09
KennyPatel20-Nov-07 19:09 
GeneralRe: Gridview Pin
mojojojojo28-Nov-07 15:06
mojojojojo28-Nov-07 15:06 
QuestionHow can I pass an enumeration type? [modified] Pin
JoeRip20-Nov-07 14:52
JoeRip20-Nov-07 14:52 
I have a struct which describes the attributes (properties, really) of a property. So:

struct TrackProperty(int PropertyIndex)<br />
{<br />
<br />
string Name;<br />
string DataTypeAsString;<br />
int MaxStringLength;<br />
int MinStringLength;<br />
int MaxIntValue;<br />
int MinIntValue;<br />
bool IsEnumerated;<br />
string EnumerationTypeAsString;<br />
<br />
}


Note that I am passing the name of the enumeration in the final field EnumerationTypeAsString (ie, "iTunesLib.VideoKind"). I want the code which instantiates this object to be able to use the name of the enumeration to get the valid values for this attribute of the specified property.

Is that possible? Can I go from a string containing the name of the enum type to the values in the enum itself? Or is there a better piece of data to use in that final field?

Having read MSDN on GetType(), and because the enum type I want to pass is from a DLL (they say don't use GetType on DLL assemblies), I think I want to pass the string description instead of calling GetType() myself. But how, on the other side, does the object instantiator go from the string to the Enum?

-- modified at 21:09 Tuesday 20th November, 2007
AnswerRe: How can I pass an enumeration type? Pin
JoeRip20-Nov-07 15:42
JoeRip20-Nov-07 15:42 
GeneralRe: How can I pass an enumeration type? Pin
Luc Pattyn20-Nov-07 17:07
sitebuilderLuc Pattyn20-Nov-07 17:07 
QuestionLinking 2d shapes together Pin
Colm_L20-Nov-07 12:43
Colm_L20-Nov-07 12:43 
AnswerRe: Linking 2d shapes together Pin
Skippums20-Nov-07 13:09
Skippums20-Nov-07 13:09 
GeneralRe: Linking 2d shapes together Pin
Colm_L20-Nov-07 13:38
Colm_L20-Nov-07 13:38 
GeneralRe: Linking 2d shapes together Pin
Skippums20-Nov-07 13:50
Skippums20-Nov-07 13:50 
QuestionProblem with System.Configuration.GetSection Pin
KenD20-Nov-07 10:53
KenD20-Nov-07 10:53 
QuestionLog4net problem [modified] Pin
allanb2320-Nov-07 10:49
allanb2320-Nov-07 10:49 
AnswerRe: Log4net problem Pin
Skippums20-Nov-07 10:54
Skippums20-Nov-07 10:54 
Question.NET Windows Service + COM component - Freezing on ((System.ComponentModel.ISupportInitialize)(this.axMapPro1)).EndInit(); Pin
gixxersix8520-Nov-07 9:15
gixxersix8520-Nov-07 9:15 
QuestionC# How to create a Menu tab from a XML file Pin
ddubey20-Nov-07 8:05
ddubey20-Nov-07 8:05 
AnswerRe: C# How to create a Menu tab from a XML file Pin
Not Active20-Nov-07 11:40
mentorNot Active20-Nov-07 11:40 
GeneralRe: C# How to create a Menu tab from a XML file Pin
ddubey20-Nov-07 11:48
ddubey20-Nov-07 11:48 
GeneralRe: C# How to create a Menu tab from a XML file Pin
ddubey20-Nov-07 13:31
ddubey20-Nov-07 13:31 
GeneralRe: C# How to create a Menu tab from a XML file Pin
Not Active20-Nov-07 14:31
mentorNot Active20-Nov-07 14:31 
GeneralRe: C# How to create a Menu tab from a XML file Pin
ddubey20-Nov-07 14:39
ddubey20-Nov-07 14:39 
QuestionDistributed Processing Pin
DarrollWalsh20-Nov-07 7:40
DarrollWalsh20-Nov-07 7:40 

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.