DataSet.Prefix Proprietà

Definizione

Ottiene o imposta un prefisso XML che aliasa lo spazio dei nomi dell'oggetto DataSet.

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

Valore della proprietà

Prefisso XML per lo spazio dei DataSet nomi.

Attributi

Esempio

Nell'esempio seguente viene impostato l'oggetto Prefix prima di chiamare il ReadXml metodo .

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

Commenti

La Prefix proprietà viene utilizzata in un documento XML per identificare gli elementi che appartengono allo spazio dei nomi dell'oggetto DataSet ,come impostato dalla Namespace proprietà .

Si applica a

Vedi anche