DataSet.Prefix Propiedad

Definición

Obtiene o establece un prefijo XML que alias el espacio de nombres de DataSet.

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

Valor de propiedad

Prefijo XML para el DataSet espacio de nombres.

Atributos

Ejemplos

En el ejemplo siguiente se establece antes Prefix de llamar al ReadXml método .

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

Comentarios

La Prefix propiedad se usa a lo largo de un documento XML para identificar los elementos que pertenecen al espacio de nombres del DataSet objeto (como establece la Namespace propiedad).

Se aplica a

Consulte también