Perhaps TypeDescriptor requires the types being inspected to implement IComponent? I've not tried it, but it's perhaps a direction to investigate.
Posted 7-Oct am Chris Trelawny-Ross. So, since I've not used TypeDescriptor , I'm only guessing From the little I've read, it exists to support people doing COM work, where parts of a type may not be statically known i. But I'm not even sure of that. GetProperties , or can you use Type. Re VB.
Net vs C - I doubt the problem is due to some intrinsice difference between VB. Net and C , but to understanding how TypeDesriptor works I expect that when you get it to work you'' be able to make it work in both languages. It's a free reverse-engineering tool for. Net assemblies. It generates C or VB. Net source from the IL in an assembly. So, when you get your problem working in one language, you can use Reflector to see how it would look in the other.
In your 'What I should be doing' section, note that you're declaring myprop as an instance field, but MyProp as a static property: this will not compile because the static property doesn't know anything about the internals of instances. Posted 7-Oct pm Chris Trelawny-Ross. I've just re-read you opening description of the problem. Is there a reason why you are not able to use. Net's built-in settings infrastructure? Configuration namespace will still meet your need.
Mzwijacz Oct pm. There is some behavior that I don't like about the build in configuration. First with the My. Settings the application level settings are read only. The user settings are stored way down in documents and settings someplace and are hard to find. Lastly there could be 20 different copies of these settings on how the application is going to be used but the settings are related to each other, so they need to stay togather. Thats why I went down this path.
Thanks so much for you help Chris, Michael Z. It seems to see them as Fields. I was able to discover this because Type. GetFields saw them but Type. GetProperties did not. New issue. Jump to bottom. GetConverter, what is the expected result if there is no converter? Labels area-System. Milestone 1. Copy link. Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in. Linked pull requests.
You signed in with another tab or window. Creates an instance of the type that this TypeConverter is associated with, using the specified context, given a set of property values for the object. Returns whether changing a value on this object requires a call to the CreateInstance IDictionary method to create a new value. Returns whether changing a value on this object requires a call to CreateInstance IDictionary to create a new value, using the specified context.
Returns a collection of properties for the type of array specified by the value parameter, using the specified context. Returns a collection of properties for the type of array specified by the value parameter, using the specified context and attributes. Returns a collection of standard values from the default context for the data type this type converter is designed for.
Returns a collection of standard values for the data type this type converter is designed for when provided with a format context. Returns whether the collection of standard values returned from GetStandardValues is an exclusive list. Returns whether the collection of standard values returned from GetStandardValues is an exclusive list of possible values, using the specified context. Returns whether this object supports a standard set of values that can be picked from a list, using the specified context.
Gets the Type of the current instance. Creates a shallow copy of the current Object. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Decimal Converter Class Reference Is this page helpful? Please rate your experience Yes No. Any additional feedback? Namespace: System. ComponentModel Assembly: System. Note You should never create an instance of the DecimalConverter class. In this article. Inherited from BaseNumberConverter.
CanConvertFrom Type. Inherited from TypeConverter.
0コメント