I
INeedADip
PropertyInfo[] props = obj.GetType().GetProperties();
foreach (PropertyInfo p in props)
if (p.PropertyType is ValueType)
this._commonProperties.Add(p.Name, p.GetValue(request,
null).ToString());
I get a warning that says p.PropertyType will never be ValueType....and it
was right.
After stepping through it the types are "System.Boolean" etc...
I want to add all integer, string, and boolean types to NameValueCollection,
but not objects.
I thought System.Boolean was a ValueType?
How should I test for this?
foreach (PropertyInfo p in props)
if (p.PropertyType is ValueType)
this._commonProperties.Add(p.Name, p.GetValue(request,
null).ToString());
I get a warning that says p.PropertyType will never be ValueType....and it
was right.
After stepping through it the types are "System.Boolean" etc...
I want to add all integer, string, and boolean types to NameValueCollection,
but not objects.
I thought System.Boolean was a ValueType?
How should I test for this?