sarah berderian
sarah berderian

Reputation: 15

Determine the basetype of a type in UWP

I am developing a win 10 app. I would like to know the BaseType of a Type. How to do that using Reflection in uwp. Thank you.

Upvotes: 1

Views: 436

Answers (1)

Aman Sharma
Aman Sharma

Reputation: 698

You can use GetTypeInfo extension method to get BaceType.

Type t = typeof(int);
Type baseType = t.GetTypeInfo().BaseType; // Returns System.ValueType

Upvotes: 5

Related Questions