DataConnectionProperties.AddProperty Method (String, Type, array<Attribute )
Dynamically adds a new property to the collection of properties natively recognized by this data connection properties instance.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaración
Protected Function AddProperty ( _
name As String, _
type As Type, _
ParamArray attributes As Attribute() _
) As PropertyDescriptor
protected PropertyDescriptor AddProperty(
string name,
Type type,
params Attribute[] attributes
)
protected:
PropertyDescriptor^ AddProperty(
String^ name,
Type^ type,
... array<Attribute^>^ attributes
)
member AddProperty :
name:string *
type:Type *
attributes:Attribute[] -> PropertyDescriptor
protected function AddProperty(
name : String,
type : Type,
... attributes : Attribute[]
) : PropertyDescriptor
Parameters
- name
Type: System.String
The property name.
- type
Type: System.Type
The data type of the property.
- attributes
Type: array<System.Attribute[]
A set of attributes to attach to the property.
Return Value
Type: System.ComponentModel.PropertyDescriptor
The descriptor of the newly added property.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The name and/or type parameters are null. |
InvalidOperationException | The specified property already exists. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
DataConnectionProperties Class