N
Norman
I have a collection that can have a reference to various types of
arrays.
String was easy:
...
string[] sPropertyArray = (string[])oReturn[oProperty.Name];
foreach( string sItem in sPropertyArray )
{
...
How do I handle a UInt16 array?
I have tried( and various permutations):
...
uint[] iPropertyArray = (uint[])TypeConverter.ConvertTo(
oReturn[oProperty.Name] , typeof( System.UInt32[] ) );
foreach( uint iItem in iPropertyArray )
{
...
Continue to get:
error CS0120: An object reference is required for the nonstatic
field, method, or property
'System.ComponentModel.TypeConverter.ConvertTo(object, System.Type)'
Thanks,
Norman
arrays.
String was easy:
...
string[] sPropertyArray = (string[])oReturn[oProperty.Name];
foreach( string sItem in sPropertyArray )
{
...
How do I handle a UInt16 array?
I have tried( and various permutations):
...
uint[] iPropertyArray = (uint[])TypeConverter.ConvertTo(
oReturn[oProperty.Name] , typeof( System.UInt32[] ) );
foreach( uint iItem in iPropertyArray )
{
...
Continue to get:
error CS0120: An object reference is required for the nonstatic
field, method, or property
'System.ComponentModel.TypeConverter.ConvertTo(object, System.Type)'
Thanks,
Norman