次の方法で共有


VirtualTypeBuilder.PropertyInfoCollection.Add Method

Definition

Overloads

Add(PropertyInfo)

Adds a PropertyInfo to the end of the collection.

Add(String, Type, Boolean)

Adds a PropertyInfo to the end of the collection.

Add(String, Type, Boolean, Attribute[])

Adds a PropertyInfo to the end of the collection.

Add(String, Type, Boolean, Type[])

Adds a PropertyInfo to the end of the collection.

Add(String, Type, Boolean, Attribute[], MethodAttributes)

Adds a PropertyInfo to the end of the collection.

Add(String, Type, Boolean, Type[], Attribute[])

Adds a PropertyInfo to the end of the collection.

Add(String, Type, Boolean, Type[], Attribute[], MethodAttributes)

Adds a PropertyInfo to the end of the collection.

Add(PropertyInfo)

Adds a PropertyInfo to the end of the collection.

public:
 int Add(System::Reflection::PropertyInfo ^ value);
public int Add (System.Reflection.PropertyInfo value);
member this.Add : System.Reflection.PropertyInfo -> int
Public Function Add (value As PropertyInfo) As Integer

Parameters

value
PropertyInfo

The PropertyInfo to be added to the end of the collection.

Returns

The index at which the value has been added.

Applies to

Add(String, Type, Boolean)

Adds a PropertyInfo to the end of the collection.

public:
 int Add(System::String ^ name, Type ^ propertyType, bool readOnly);
public:
 int Add(Platform::String ^ name, Platform::Type ^ propertyType, bool readOnly);
public int Add (string name, Type propertyType, bool readOnly);
member this.Add : string * Type * bool -> int
Public Function Add (name As String, propertyType As Type, readOnly As Boolean) As Integer

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of the property.

readOnly
Boolean

Determines if this property is read only or read write.

Returns

The index at which the value has been added.

Exceptions

name is null.-or- propertyType is null.

propertyType is not a runtime type.

Applies to

Add(String, Type, Boolean, Attribute[])

Adds a PropertyInfo to the end of the collection.

public:
 int Add(System::String ^ name, Type ^ propertyType, bool readOnly, cli::array <Attribute ^> ^ attributes);
public:
 int Add(Platform::String ^ name, Platform::Type ^ propertyType, bool readOnly, Platform::Array <Platform::Metadata::Attribute ^> ^ attributes);
public int Add (string name, Type propertyType, bool readOnly, Attribute[] attributes);
member this.Add : string * Type * bool * Attribute[] -> int
Public Function Add (name As String, propertyType As Type, readOnly As Boolean, attributes As Attribute()) As Integer

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of the property.

readOnly
Boolean

Determines whether this property is read-only or read-write.

attributes
Attribute[]

This parameter is used to configure the class member appropriately. Add only accepts the values of MemberAttributes that fit into the AccessMask or ScopeMask categories.

Returns

The index at which the value has been added.

Exceptions

name is null.-or- propertyType is null-or-An element in attributes is null. attributes may be null.

propertyType is not a runtime type.

Applies to

Add(String, Type, Boolean, Type[])

Adds a PropertyInfo to the end of the collection.

public:
 int Add(System::String ^ name, Type ^ propertyType, bool readOnly, cli::array <Type ^> ^ parameterTypes);
public:
 int Add(Platform::String ^ name, Platform::Type ^ propertyType, bool readOnly, Platform::Array <Platform::Type ^> ^ parameterTypes);
public int Add (string name, Type propertyType, bool readOnly, Type[] parameterTypes);
member this.Add : string * Type * bool * Type[] -> int
Public Function Add (name As String, propertyType As Type, readOnly As Boolean, parameterTypes As Type()) As Integer

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of the property.

readOnly
Boolean

Determines if this property is read-only or read-write.

parameterTypes
Type[]

Returns

The index at which the value has been added.

Exceptions

name is null.-or- propertyType is null-or-An element in paramTypes is null. paramTypes may be null.

propertyType is not a runtime type.

Applies to

Add(String, Type, Boolean, Attribute[], MethodAttributes)

Adds a PropertyInfo to the end of the collection.

public:
 int Add(System::String ^ name, Type ^ propertyType, bool readOnly, cli::array <Attribute ^> ^ attributes, System::Reflection::MethodAttributes methodAttributes);
public int Add (string name, Type propertyType, bool readOnly, Attribute[] attributes, System.Reflection.MethodAttributes methodAttributes);
member this.Add : string * Type * bool * Attribute[] * System.Reflection.MethodAttributes -> int
Public Function Add (name As String, propertyType As Type, readOnly As Boolean, attributes As Attribute(), methodAttributes As MethodAttributes) As Integer

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of the property.

readOnly
Boolean

Determines if this property is read only or read write.

attributes
Attribute[]

This parameter is used to configure the class member appropriately. Add only accepts the values of MemberAttributes that fit into the AccessMask or ScopeMask categories.

methodAttributes
MethodAttributes

Specifies additional event attributes for this member. The default method attribute is Public. The only method attributes supported today are Public and Static .

Returns

The index at which the value has been added.

Exceptions

name is null.-or- propertyType is null-or-An element in attributes is null. attributes may be null.

propertyType is not a runtime type.

Applies to

Add(String, Type, Boolean, Type[], Attribute[])

Adds a PropertyInfo to the end of the collection.

public:
 int Add(System::String ^ name, Type ^ propertyType, bool readOnly, cli::array <Type ^> ^ parameterTypes, cli::array <Attribute ^> ^ attributes);
public:
 int Add(Platform::String ^ name, Platform::Type ^ propertyType, bool readOnly, Platform::Array <Platform::Type ^> ^ parameterTypes, Platform::Array <Platform::Metadata::Attribute ^> ^ attributes);
public int Add (string name, Type propertyType, bool readOnly, Type[] parameterTypes, Attribute[] attributes);
member this.Add : string * Type * bool * Type[] * Attribute[] -> int
Public Function Add (name As String, propertyType As Type, readOnly As Boolean, parameterTypes As Type(), attributes As Attribute()) As Integer

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of the property.

readOnly
Boolean

Determines if this property is read only or read write.

parameterTypes
Type[]
attributes
Attribute[]

This parameter is used to configure the class member appropriately. Add only accepts the values of MemberAttributes that fit into the AccessMask or ScopeMask categories.

Returns

The index at which the value has been added.

Exceptions

name is null.-or- propertyType is null-or-An element in attributes is null.-or-An element in paramTypes is null. attributes and paramTypes may be null.

propertyType is not a runtime type.

Applies to

Add(String, Type, Boolean, Type[], Attribute[], MethodAttributes)

Adds a PropertyInfo to the end of the collection.

public:
 int Add(System::String ^ name, Type ^ propertyType, bool readOnly, cli::array <Type ^> ^ parameterTypes, cli::array <Attribute ^> ^ attributes, System::Reflection::MethodAttributes methodAttributes);
public int Add (string name, Type propertyType, bool readOnly, Type[] parameterTypes, Attribute[] attributes, System.Reflection.MethodAttributes methodAttributes);
member this.Add : string * Type * bool * Type[] * Attribute[] * System.Reflection.MethodAttributes -> int
Public Function Add (name As String, propertyType As Type, readOnly As Boolean, parameterTypes As Type(), attributes As Attribute(), methodAttributes As MethodAttributes) As Integer

Parameters

name
String

The name of the property to add.

propertyType
Type

The type of the property.

readOnly
Boolean

Determines if this property is read only or read write.

parameterTypes
Type[]
attributes
Attribute[]

This parameter is used to configure the class member appropriately. Add only accepts the values of MemberAttributes that fit into the AccessMask or ScopeMask categories.

methodAttributes
MethodAttributes

Specifies additional event attributes for this member. The default method attribute is Public. The only method attributes supported today are Public and Static.

Returns

The index at which the value has been added.

Exceptions

name is null.-or- propertyType is null-or-An element in attributes is null.-or-An element in paramTypes is null. attributes and paramTypes may be null.

propertyType is not a runtime type.

Applies to