Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Dynamically adds a new property to the collection of properties natively recognized by the current instance of the DataConnectionProperties class.
Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
Protected Function AddProperty ( _
    descriptor As PropertyDescriptor, _
    ParamArray attributes As Attribute() _
) As PropertyDescriptor
protected PropertyDescriptor AddProperty(
    PropertyDescriptor descriptor,
    params Attribute[] attributes
)
protected:
PropertyDescriptor^ AddProperty(
    PropertyDescriptor^ descriptor, 
    ... array<Attribute^>^ attributes
)
member AddProperty : 
        descriptor:PropertyDescriptor * 
        attributes:Attribute[] -> PropertyDescriptor
protected function AddProperty(
    descriptor : PropertyDescriptor, 
    ... attributes : Attribute[]
) : PropertyDescriptor
Parameters
- descriptor 
 Type: System.ComponentModel.PropertyDescriptor- A PropertyDescriptor object that provides a description of this property and its characteristics. 
- attributes 
 Type: array<System.Attribute[]- A set of attributes to apply to the property. 
Return Value
Type: System.ComponentModel.PropertyDescriptor
Returns the descriptor of the newly added property.
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentNullException | The descriptor parameter is null. | 
| InvalidOperationException | The specified property already exists. | 
Remarks
The input property descriptor is wrapped by a specialized connection property descriptor, so the return value is actually a different PropertyDescriptor instance than the one passed in.
.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