net90_PropertyGridHelpers.Support_Support_GetPropertyInfo - dparvin/PropertyGridHelpers GitHub Wiki

Support.GetPropertyInfo method

Retrieves the PropertyInfo for the property described by the specified ITypeDescriptorContext.

public static PropertyInfo GetPropertyInfo(ITypeDescriptorContext context)
parameter description
context The type descriptor context containing metadata about the property, including its name and declaring component type.

Return Value

A PropertyInfo object representing the property described by context.

Exceptions

exception condition
ArgumentNullException Thrown when context is null.
ArgumentException Thrown when context does not contain a valid PropertyDescriptor.
InvalidOperationException Thrown when the property described by the context could not be found on the component type.

Examples

Example usage:

 var context = TypeDescriptorContext.Create(typeof(MyClass), "MyProperty");
            PropertyInfo info = Support.GetPropertyInfo(context);

See Also

⚠️ **GitHub.com Fallback** ⚠️