dimanche 7 juin 2015

What's the difference or relationship between Type and TypeInfo?

I cannot fully understand when to use one or another. They are so similar that it's confusing me every now and them. When it comes to reflection, I don't know whether to use the plain Type or TypeInfo.

.NET Framework itself adds more confusion with things like assembly.DefinedTypes. It retrieves an IEnumerable<TypeInfo> where I supposed it would be of IEnumerable<Type>. Also, there is a typeInfo.AsType() method. What's the meaning of that? are they interchangeable?

Moreover, they have methods that are really similar.

It seems that TypeInfo is like a more powerful version of the classic Type. Am I wrong?

Thanks!





Aucun commentaire:

Enregistrer un commentaire