System.ComponentModel.DebugTypeDescriptor.ComponentEntry.GetDefaultProperty C# (CSharp) Method

GetDefaultProperty() public method

public GetDefaultProperty ( object component ) : PropertyDescriptor
component object
return PropertyDescriptor
            public PropertyDescriptor GetDefaultProperty(object component) {
                string name = ((DefaultPropertyAttribute)GetAttributes(component)[typeof(DefaultPropertyAttribute)]).Name;
                if (name != null) {
                    return GetProperties(component, null)[name];
                }
                return null;
            }