J
Jeronimo Bertran
I have a property with a member of type object. I am showing the value of
this property in a PropertyGrid but depending on the type of the object I
want to use the correspondant TypeConverter. Here is an example of what I
mean:
public byte[] Test
{
get { return new byte[100]; }
}
public object Test2
{
get { return new byte[100]; }
}
If I have both properties in a property grid, Test will be shown as an
expandable item with the text "Byte[] Array".. if I expand the item I will
be able to see all of the elements in the array. However, Test2 will only
show the text "System.Byte[]" and I will have no way of reading the
elements of the array.
Of course the property of type object will not always contain a byte[].
How can I provide the standard functionality for each type?
Thanks
this property in a PropertyGrid but depending on the type of the object I
want to use the correspondant TypeConverter. Here is an example of what I
mean:
public byte[] Test
{
get { return new byte[100]; }
}
public object Test2
{
get { return new byte[100]; }
}
If I have both properties in a property grid, Test will be shown as an
expandable item with the text "Byte[] Array".. if I expand the item I will
be able to see all of the elements in the array. However, Test2 will only
show the text "System.Byte[]" and I will have no way of reading the
elements of the array.
Of course the property of type object will not always contain a byte[].
How can I provide the standard functionality for each type?
Thanks