M
Mythran
How can I set a DefaultValue for an array property? I don't have a project
that uses this anymore, but still am curious. Of all the replies I've
posted here, a simple thing like this is my "gotcha!". :***(
I have a TypeConverter class that inherits from ArrayConverter and it parses
a string into an integer-array. The property that gets/sets the array has
the TypeConverter attribute assigned to this type-converter. One of the
constructor overloads for the DefaultValueAttribute is DefaultValue(Type,
Value) where Type is the type that has a TypeConverter to use to convert
Value to the specified Type.
Well, my TypeConverter isn't the converter for the integer-array type ;( So
I don't believe using that overload is what I need...even though
theoretically, it's the closest thing I've got ...
Thanks,
Mythran
that uses this anymore, but still am curious. Of all the replies I've
posted here, a simple thing like this is my "gotcha!". :***(
I have a TypeConverter class that inherits from ArrayConverter and it parses
a string into an integer-array. The property that gets/sets the array has
the TypeConverter attribute assigned to this type-converter. One of the
constructor overloads for the DefaultValueAttribute is DefaultValue(Type,
Value) where Type is the type that has a TypeConverter to use to convert
Value to the specified Type.
Well, my TypeConverter isn't the converter for the integer-array type ;( So
I don't believe using that overload is what I need...even though
theoretically, it's the closest thing I've got ...
Thanks,
Mythran