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

속성 값

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 설정한 대로).

적용 대상

추가 정보