Binary Artist

The Jason Marshall Experience

Binary Artist

Jason Marshall
E-mail me Send mail

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

Iterate through Struct Constants using reflection

 

using System.Reflection;
 

public Hashtable searchHash = new Hashtable();
System.Reflection.FieldInfo[] fields = [myStructName].GetType().GetFields();
foreach (System.Reflection.FieldInfo field in fields)
{
searchHash.Add(field.GetValue([myStructName]).ToString(),
"|");
}


Posted by Admin on Monday, July 14, 2008 4:18 AM
Permalink | Comments (15) | Post RSSRSS comment feed
Free Hit Counters
page counter