Freigeben über


DataConnectionProperties.AddProperty Method

Definition

Overloads

AddProperty(PropertyDescriptor, Attribute[])

Dynamically adds a new property to the collection of properties natively recognized by the current instance of the DataConnectionProperties class.

AddProperty(String, Type, Attribute[])

Dynamically adds a new property to the collection of properties natively recognized by this data connection properties instance.

AddProperty(PropertyDescriptor, Attribute[])

Dynamically adds a new property to the collection of properties natively recognized by the current instance of the DataConnectionProperties class.

protected:
 System::ComponentModel::PropertyDescriptor ^ AddProperty(System::ComponentModel::PropertyDescriptor ^ descriptor, ... cli::array <Attribute ^> ^ attributes);
protected System.ComponentModel.PropertyDescriptor AddProperty (System.ComponentModel.PropertyDescriptor descriptor, params Attribute[] attributes);
member this.AddProperty : System.ComponentModel.PropertyDescriptor * Attribute[] -> System.ComponentModel.PropertyDescriptor
Protected Function AddProperty (descriptor As PropertyDescriptor, ParamArray attributes As Attribute()) As PropertyDescriptor

Parameters

descriptor
PropertyDescriptor

A PropertyDescriptor object that provides a description of this property and its characteristics.

attributes
Attribute[]

A set of attributes to apply to the property.

Returns

Returns the descriptor of the newly added property.

Exceptions

The descriptor parameter is null.

The specified property already exists.

Applies to

AddProperty(String, Type, Attribute[])

Dynamically adds a new property to the collection of properties natively recognized by this data connection properties instance.

protected:
 System::ComponentModel::PropertyDescriptor ^ AddProperty(System::String ^ name, Type ^ type, ... cli::array <Attribute ^> ^ attributes);
protected System.ComponentModel.PropertyDescriptor AddProperty (string name, Type type, params Attribute[] attributes);
member this.AddProperty : string * Type * Attribute[] -> System.ComponentModel.PropertyDescriptor
Protected Function AddProperty (name As String, type As Type, ParamArray attributes As Attribute()) As PropertyDescriptor

Parameters

name
String

The property name.

type
Type

The data type of the property.

attributes
Attribute[]

A set of attributes to attach to the property.

Returns

The descriptor of the newly added property.

Exceptions

The name and/or type parameters are null.

The specified property already exists.

Applies to