DataSet.Prefix プロパティ

定義

DataSet の名前空間に別名を付ける XML プリフィックスを取得または設定します。

public:
 property System::String ^ Prefix { System::String ^ get(); void set(System::String ^ value); };
public string Prefix { get; set; }
[System.Data.DataSysDescription("DataSetPrefixDescr")]
public string Prefix { get; set; }
member this.Prefix : string with get, set
[<System.Data.DataSysDescription("DataSetPrefixDescr")>]
member this.Prefix : string with get, set
Public Property Prefix As String

プロパティ値

DataSet 名前空間の XML プリフィックス。

属性

次の例では、 メソッドを Prefix 呼び出す前に を ReadXml 設定します。

private void ReadData(DataSet thisDataSet)
{
    thisDataSet.Namespace = "CorporationA";
    thisDataSet.Prefix = "DivisionA";

    // Read schema and data.
    string fileName = "CorporationA_Schema.xml";
    thisDataSet.ReadXmlSchema(fileName);
    fileName = "DivisionA_Report.xml";
    thisDataSet.ReadXml(fileName);
}
Private Sub ReadData(thisDataSet As DataSet)
    thisDataSet.Namespace = "CorporationA"
    thisDataSet.Prefix = "DivisionA"

    ' Read schema and data.
    Dim fileName As String = "CorporationA_Schema.xml"
    thisDataSet.ReadXmlSchema(fileName)
    fileName = "DivisionA_Report.xml"
    thisDataSet.ReadXml(fileName)
End Sub

注釈

プロパティは Prefix XML ドキュメント全体で使用され、(プロパティによって設定される) オブジェクトの DataSet 名前空間に属する要素を Namespace 識別します。

適用対象

こちらもご覧ください