Adds a PropertyInfo to the end of the collection.
Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
声明
Public Function Add ( _
    name As String, _
    propertyType As Type, _
    readOnly As Boolean, _
    parameterTypes As Type() _
) As Integer
用法
Dim instance As VirtualTypeBuilder..::..PropertyInfoCollection
Dim name As String
Dim propertyType As Type
Dim readOnly As Boolean
Dim parameterTypes As Type()
Dim returnValue As Integer
returnValue = instance.Add(name, propertyType, _
    readOnly, parameterTypes)
public int Add(
    string name,
    Type propertyType,
    bool readOnly,
    Type[] parameterTypes
)
public:
int Add(
    String^ name, 
    Type^ propertyType, 
    bool readOnly, 
    array<Type^>^ parameterTypes
)
member Add : 
        name:string * 
        propertyType:Type * 
        readOnly:bool * 
        parameterTypes:Type[] -> int 
public function Add(
    name : String, 
    propertyType : Type, 
    readOnly : boolean, 
    parameterTypes : Type[]
) : int
Parameters
- name
Type: System.String
The name of the property to add. 
- propertyType
Type: System.Type
The type of the property. 
- readOnly
Type: System.Boolean
Determines if this property is read-only or read-write. 
- parameterTypes
Type: array<System.Type[] 
Return Value
Type: System.Int32
The index at which the value has been added.
Exceptions
| Exception | Condition | 
|---|---|
| ArgumentNullException | name is nulla null reference (Nothing in Visual Basic). -or- propertyType is nulla null reference (Nothing in Visual Basic) -or- An element in paramTypes is nulla null reference (Nothing in Visual Basic). paramTypes may be nulla null reference (Nothing in Visual Basic).  | 
| ArgumentException | propertyType is not a runtime type.  | 
.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
VirtualTypeBuilder.PropertyInfoCollection Class