VirtualTypeBuilder::PropertyInfoCollection::Add Method (String^, Type^, Boolean, array<Type^>^, array<Attribute^>^)
Visual Studio 2015
Adds a PropertyInfo to the end of the collection.
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
public: int Add( String^ name, Type^ propertyType, bool readOnly, array<Type^>^ parameterTypes, array<Attribute^>^ attributes )
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.
- paramTypes
The types of parameters in a parameterized property.
- attributes
-
Type:
array<System::Attribute^>^
This parameter is used to configure the class member appropriately. Add only accepts the values of MemberAttributes that fit into the AccessMask or ScopeMask categories.
| Exception | Condition |
|---|---|
| ArgumentNullException | name is null. -or- propertyType is null -or- An element in attributes is null. -or- An element in paramTypes is null. attributes and paramTypes may be null. |
| ArgumentException | propertyType is not a runtime type. |
Show: