Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
GeneralRe: dynamic function call Pin
vatzcar17-Mar-06 16:46
vatzcar17-Mar-06 16:46 
AnswerRe: dynamic function call Pin
Guffa19-Mar-06 9:49
Guffa19-Mar-06 9:49 
GeneralRe: dynamic function call Pin
vatzcar20-Mar-06 5:07
vatzcar20-Mar-06 5:07 
AnswerRe: dynamic function call Pin
engsrini17-Mar-06 7:20
engsrini17-Mar-06 7:20 
GeneralRe: dynamic function call Pin
vatzcar17-Mar-06 19:47
vatzcar17-Mar-06 19:47 
QuestionCut/Copy/Paste for TreeView Pin
zaboboa17-Mar-06 5:08
zaboboa17-Mar-06 5:08 
AnswerRe: Cut/Copy/Paste for TreeView Pin
Ed.Poore17-Mar-06 12:52
Ed.Poore17-Mar-06 12:52 
QuestionHow to get the Enum item names using Reflection Pin
engsrini17-Mar-06 3:07
engsrini17-Mar-06 3:07 
Hi

I am struggling over getting the enum items name using reflection
say this the enum
/ Enum for Art Mode		<br />
public   enum  tenumArtMode<br />
{<br />
    artModeAuto=0,<br />
    artModeManual,<br />
    artModeInvalid<br />
} ;

Note:: this enum is in dll which is developed in VC++ .NET, I have added reference to access this enum in C#

I want to display this enum items using C#

I have tried the function Enum.GetName

tenumArtMode tenumMode;<br />
Type t=tenumMode.GetType();<br />
<br />
Enum.GetName(t.FieldType,t.GetValue(tenumMode));


But this throws me an ArgumentException

TIA
Srini
AnswerRe: How to get the Enum item names using Reflection Pin
mcljava17-Mar-06 4:22
mcljava17-Mar-06 4:22 
QuestionRe: How to get the Enum item names using Reflection Pin
engsrini17-Mar-06 5:53
engsrini17-Mar-06 5:53 
AnswerRe: How to get the Enum item names using Reflection Pin
Guffa17-Mar-06 6:16
Guffa17-Mar-06 6:16 
QuestionRe: How to get the Enum item names using Reflection Pin
engsrini17-Mar-06 7:08
engsrini17-Mar-06 7:08 
AnswerRe: How to get the Enum item names using Reflection Pin
Guffa17-Mar-06 7:32
Guffa17-Mar-06 7:32 
GeneralRe: How to get the Enum item names using Reflection Pin
engsrini17-Mar-06 8:32
engsrini17-Mar-06 8:32 
GeneralRe: How to get the Enum item names using Reflection Pin
Guffa17-Mar-06 8:34
Guffa17-Mar-06 8:34 
QuestionRe: How to get the Enum item names using Reflection Pin
engsrini17-Mar-06 8:41
engsrini17-Mar-06 8:41 
AnswerRe: How to get the Enum item names using Reflection Pin
engsrini17-Mar-06 8:44
engsrini17-Mar-06 8:44 
GeneralRe: How to get the Enum item names using Reflection Pin
Guffa17-Mar-06 8:54
Guffa17-Mar-06 8:54 
AnswerRe: How to get the Enum item names using Reflection Pin
chriswa17-Mar-06 13:26
chriswa17-Mar-06 13:26 
GeneralRe: How to get the Enum item names using Reflection Pin
engsrini20-Mar-06 1:42
engsrini20-Mar-06 1:42 
QuestionTime & Date Pin
deepscyberpulse17-Mar-06 2:43
deepscyberpulse17-Mar-06 2:43 
AnswerRe: Time & Date Pin
Sean Michael Murphy17-Mar-06 2:50
Sean Michael Murphy17-Mar-06 2:50 
AnswerRe: Time & Date Pin
sherwani17-Mar-06 2:51
sherwani17-Mar-06 2:51 
AnswerRe: Time & Date Pin
JuanAlbertoMD17-Mar-06 3:45
JuanAlbertoMD17-Mar-06 3:45 
QuestionNeed Help in c# Pin
mynameatif17-Mar-06 2:43
mynameatif17-Mar-06 2:43 

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.