TypeDescriptor.CreateProperty Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Membuat deskriptor properti baru untuk properti komponen yang sudah ada.
Overload
| Nama | Deskripsi |
|---|---|
| CreateProperty(Type, PropertyDescriptor, Attribute[]) |
Membuat pendeskripsi properti baru dari deskriptor properti yang ada, menggunakan array atribut dan yang ada PropertyDescriptor yang ditentukan. |
| CreateProperty(Type, String, Type, Attribute[]) |
Membuat dan secara dinamis mengikat deskriptor properti ke jenis, menggunakan nama properti, jenis, dan array atribut yang ditentukan. |
CreateProperty(Type, PropertyDescriptor, Attribute[])
- Sumber:
- TypeDescriptor.cs
- Sumber:
- TypeDescriptor.cs
- Sumber:
- TypeDescriptor.cs
- Sumber:
- TypeDescriptor.cs
- Sumber:
- TypeDescriptor.cs
Membuat pendeskripsi properti baru dari deskriptor properti yang ada, menggunakan array atribut dan yang ada PropertyDescriptor yang ditentukan.
public:
static System::ComponentModel::PropertyDescriptor ^ CreateProperty(Type ^ componentType, System::ComponentModel::PropertyDescriptor ^ oldPropertyDescriptor, ... cli::array <Attribute ^> ^ attributes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor CreateProperty(Type componentType, System.ComponentModel.PropertyDescriptor oldPropertyDescriptor, params Attribute[] attributes);
public static System.ComponentModel.PropertyDescriptor CreateProperty(Type componentType, System.ComponentModel.PropertyDescriptor oldPropertyDescriptor, params Attribute[] attributes);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")>]
static member CreateProperty : Type * System.ComponentModel.PropertyDescriptor * Attribute[] -> System.ComponentModel.PropertyDescriptor
static member CreateProperty : Type * System.ComponentModel.PropertyDescriptor * Attribute[] -> System.ComponentModel.PropertyDescriptor
Public Shared Function CreateProperty (componentType As Type, oldPropertyDescriptor As PropertyDescriptor, ParamArray attributes As Attribute()) As PropertyDescriptor
Parameter
- oldPropertyDescriptor
- PropertyDescriptor
Pendeskripsi properti yang ada.
- attributes
- Attribute[]
Atribut baru untuk properti ini.
Mengembalikan
Baru PropertyDescriptor yang memiliki atribut metadata yang ditentukan digabungkan dengan atribut metadata yang ada.
- Atribut
Lihat juga
Berlaku untuk
CreateProperty(Type, String, Type, Attribute[])
- Sumber:
- TypeDescriptor.cs
- Sumber:
- TypeDescriptor.cs
- Sumber:
- TypeDescriptor.cs
- Sumber:
- TypeDescriptor.cs
- Sumber:
- TypeDescriptor.cs
Membuat dan secara dinamis mengikat deskriptor properti ke jenis, menggunakan nama properti, jenis, dan array atribut yang ditentukan.
public:
static System::ComponentModel::PropertyDescriptor ^ CreateProperty(Type ^ componentType, System::String ^ name, Type ^ type, ... cli::array <Attribute ^> ^ attributes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")]
public static System.ComponentModel.PropertyDescriptor CreateProperty(Type componentType, string name, Type type, params Attribute[] attributes);
public static System.ComponentModel.PropertyDescriptor CreateProperty(Type componentType, string name, Type type, params Attribute[] attributes);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("PropertyDescriptor's PropertyType cannot be statically discovered.")>]
static member CreateProperty : Type * string * Type * Attribute[] -> System.ComponentModel.PropertyDescriptor
static member CreateProperty : Type * string * Type * Attribute[] -> System.ComponentModel.PropertyDescriptor
Public Shared Function CreateProperty (componentType As Type, name As String, type As Type, ParamArray attributes As Attribute()) As PropertyDescriptor
Parameter
- name
- String
Nama properti.
- attributes
- Attribute[]
Atribut baru untuk properti ini.
Mengembalikan
PropertyDescriptor Yang terikat ke jenis yang ditentukan dan yang memiliki atribut metadata yang ditentukan digabungkan dengan atribut metadata yang ada.
- Atribut