F
Fernando Arámburu
hi everybody,
I´m working on a very strange dotnet Reflection component and i´m having
some troubles with reflection on generic types. To talk more concretely I
will gvie you some examples of what i´m looking at.
The method where I´m having some troubles needs to do get the generic
collection type from a generic collection variable. Examples (Please forget
about namespaces, í´m not writing them just to be more clear)
I have My Method
should return
List<int> List< >
type instance
Dictionary<string, object> Dictionary<> type
instance
By now I know how to get the parameter types (like int in the first
example and string and object in the second one) and how to get something
like List'1<int> or Dictionary'2<string, object> and I know I can parse the
type name as a string and then everything is fixed but I think there is some
whay to get what i´m looking at by using Reflection library. Can someone
give me a hand?
Thanks in advance.
Fernando
I´m working on a very strange dotnet Reflection component and i´m having
some troubles with reflection on generic types. To talk more concretely I
will gvie you some examples of what i´m looking at.
The method where I´m having some troubles needs to do get the generic
collection type from a generic collection variable. Examples (Please forget
about namespaces, í´m not writing them just to be more clear)
I have My Method
should return
List<int> List< >
type instance
Dictionary<string, object> Dictionary<> type
instance
By now I know how to get the parameter types (like int in the first
example and string and object in the second one) and how to get something
like List'1<int> or Dictionary'2<string, object> and I know I can parse the
type name as a string and then everything is fixed but I think there is some
whay to get what i´m looking at by using Reflection library. Can someone
give me a hand?
Thanks in advance.
Fernando