Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Dynamically adds a new property to the collection of properties natively recognized by this data connection properties instance.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaration
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 nulla null reference (Nothing in Visual Basic). |
| ArgumentException | 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