Qwert,
| Yes, but a primitive type is a value type too but not a structure, so
Odd! Every thing I've read on .NET has indicated the opposite, that Int32 is
a primitive type & that Int32 is a Structure.
It sounds like you really need to decide what a "Structure" in the context
of your project is first, possibly without looking at the Type class. Then
we can take *your* definition of what a Structure is & possibly apply it to
the Type class.
Hope this helps
Jay
| "Value types are those that are represented as sequences of bits; value
| types are not classes or interfaces. These are referred to as "structs" in
| some programming languages."
|
| Yes, but a primitive type is a value type too but not a structure, so
| checking 'IsValueType=True' does not automaticly mean that it is a
| structure. So that is why I check 'IsPrimitive=False'.
| But now I wonder if there are more things I should check?
|
| 'ValueType=True' can be:
| Primitive type.
| Structure.
| Enum ('Type.IsEnum' for that)
| Anything else?
|
| Thanks.
|
|
| "Herfried K. Wagner [MVP]" <
[email protected]> schreef in bericht
| | >> Indeed, that is my question. And the answer is?
| >>
| >>> I think "Qwert"'s question was not how to get these properties but if
| >>> the value combination IsValueType=true and isprimitive=false is the
| >>> guarantee that the type is a structure (or if there are other
properties
| >>> that must be taken into account).
| >
| > Did you already read the "Remarks" section of the 'Type.IsValueType'
| > documentation?
| >
| > --
| > M S Herfried K. Wagner
| > M V P <URL:
http://dotnet.mvps.org/>
| > V B <URL:
http://classicvb.org/petition/>
|
|