PersonalizableAttribute.GetPersonalizableProperties(Type) 方法
定义
返回特定属性的 PropertyInfo 对象的集合,这些属性与此参数类型匹配并标记为可个性化。Returns a collection of PropertyInfo objects for the properties that match the parameter type and are marked as personalizable.
public:
static System::Collections::ICollection ^ GetPersonalizableProperties(Type ^ type);
public static System.Collections.ICollection GetPersonalizableProperties (Type type);
static member GetPersonalizableProperties : Type -> System.Collections.ICollection
Public Shared Function GetPersonalizableProperties (type As Type) As ICollection
参数
- type
- Type
要在其上查找 Personalizable 属性的类型。The type on which to look for Personalizable properties.
返回
可个性化属性的 ICollection。An ICollection of personalizable properties.
例外
该类型上的公共属性被标记为可个性化,但为只读的。A public property on the type is marked as personalizable but is read-only.
注解
此方法返回一个包含零个或多个对象的集合 PropertyInfo ,该集合中的每个对象都被标记为可个性化,其中 IsPersonalizable 等于 true 。This method returns a collection containing zero or more PropertyInfo objects, with one object in the collection for each property of the type specified that is marked as being personalizable, where IsPersonalizable equals true.
type参数是要在其上查找属性的类型 Personalizable 。The type parameter is the type on which to look for Personalizable properties. 例如,你将传入 "typeof(MyWebPart)" 以获取 Personalizable 类的属性 MyWebPart 。For example, you would pass in "typeof(MyWebPart)" to get the Personalizable properties on the MyWebPart class.