Reputation: 15
I am porting a Silverlight application to UWP. In my Silverlight app, i get the public instance properties:
Type t;
t.GetProperties(BindingFlags.Instance | BindingFlags.Public);
In UWP it look like the GetProperties(BindingFlags.Instance | BindingFlags.Public) method is no longer available. Is there another way to accomplish this in UWP?
thank you.
Upvotes: 0
Views: 946
Reputation: 30042
From this MSDN source, you can do the following:
var props = t.GetTypeInfo().DeclaredProperties
.Where(x => x.GetMethod.IsPublic);
Upvotes: 1