共用方式為


VirtualTypeBuilder.FieldInfoCollection.Add Method (String, Type)

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

'宣告
Public Function Add ( _
    name As String, _
    fieldType As Type _
) As Integer
public int Add(
    string name,
    Type fieldType
)

Parameters

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

See Also

Reference

VirtualTypeBuilder.FieldInfoCollection Class

Add Overload

Microsoft.VisualStudio.Shell.Design Namespace