次の方法で共有


ProtocolField Constructor ()

ProtocolField クラスの新しいインスタンスを初期化します。

名前空間: Microsoft.SqlServer.Management.Nmo
アセンブリ: Microsoft.SqlServer.Smo (microsoft.sqlserver.smo.dll 内)

構文

'宣言
Public Sub New
public ProtocolField ()
public:
ProtocolField ()
public ProtocolField ()
public function ProtocolField ()

解説

更新されたテキスト :2005 年 12 月 5 日

更新されたサンプル コード :2005 年 12 月 5 日

既定のコンストラクタを使用する場合は、直ちに Name プロパティを設定してから、Parent プロパティを設定する必要があります。他のプロパティは、その後で設定できます。

使用例

次の例は、この既定のコンストラクタを使用してプロトコル フィールドを作成し、プロトコル フィールドのコレクションに追加する方法を示しています。

// Define a protocol field and set properties.
ProtocolField fileProtocolField1 = new ProtocolField();
fileProtocolField1.Name = "LeavingFrom";
fileProtocolField1.Parent = fileProtocol;
fileProtocolField1.FieldReference = "LeavingFrom";
fileProtocol.ProtocolFields.Add(fileProtocolField1);
' Define a protocol field and set properties.
Dim fileProtocolField1 As ProtocolField = New ProtocolField()
fileProtocolField1.Name = "LeavingFrom"
fileProtocolField1.Parent = fileProtocol
fileProtocolField1.FieldReference = "LeavingFrom"
fileProtocol.ProtocolFields.Add(fileProtocolField1)

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

ProtocolField Class
ProtocolField Members
Microsoft.SqlServer.Management.Nmo Namespace