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.
Adds a FieldInfo to the end of the collection.
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Public Function Add ( _
name As String, _
fieldType As Type _
) As Integer
'Usage
Dim instance As VirtualTypeBuilder..::..FieldInfoCollection
Dim name As String
Dim fieldType As Type
Dim returnValue As Integer
returnValue = instance.Add(name, fieldType)
public int Add(
string name,
Type fieldType
)
public:
int Add(
String^ name,
Type^ fieldType
)
member Add :
name:string *
fieldType:Type -> int
public function Add(
name : String,
fieldType : Type
) : int
Parameters
- name
Type: System.String
The name of the field to add.
- fieldType
Type: System.Type
The type of field.
Return Value
Type: System.Int32
The index at which the value has been added.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | name or fieldType is nulla null reference (Nothing in Visual Basic). |
| ArgumentException | fieldType is not a run-time 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.FieldInfoCollection Class