I have a code in PCL that I want to migrate to .NetStandard. Unfortunately tho, my code is dependent on .Net reflection and I cant find some of the methods previously available. So here is the list of methods or properties that I cant find under .NetStandard. Can any one point me in right direction about how to refactor my code?
Type.IsInstanceOfType()
Type.IsAssignableFrom()
Type.GetNestedTypes()
Type.GetConstructors()
Type.IsClass
Type.IsEnum
Type.IsValueType
Use GetTypeInfo. Then those members are available off the TypeInfo now.
var example = typeof(string).GetTypeInfo().IsClass;
Or you could use ReflectionBridge : https://www.nuget.org/packages/ReflectionBridge/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With