Alternative TypeDescriptor in Silverlight 3?

I use this code in WPF to check properties.

if (TypeDescriptor.GetProperties(this)[propertyName] == null)
{
      //some code here...
}

I want to use the same logic in Silverlight 3, but there is no TypeDescriptor. Anyone know an alternative way to do this in Silverlight.

+3
source share
1 answer

Any reason not to use Type.GetProperties/ Type.GetProperty?

PropertyInfo property = GetType().GetProperty(propertyName);
...

I know that they are not completely equivalent, but if you are dealing with a “normal” property, it can be close enough.

+4
source

Source: https://habr.com/ru/post/1734027/


All Articles