SectionInformation.GetRawXml 方法

定义

返回一个 XML 节点对象,该对象表示关联的配置节对象。

public:
 System::String ^ GetRawXml();
public string GetRawXml();
member this.GetRawXml : unit -> string
Public Function GetRawXml () As String

返回

此配置部分的 XML 表示形式。

例外

此配置对象已锁定,无法编辑。

示例

以下示例演示如何使用 GetRawXml 该方法。

static public void GetSectionXml()
{
    SectionInformation sInfo =
        GetSectionInformation();

    string sectionXml =
        sInfo.GetRawXml();

    Console.WriteLine("Section xml:");
    Console.WriteLine(sectionXml);
}
Public Shared Sub GetSectionXml()

    Dim sInfo As SectionInformation = _
    GetSectionInformation()

    Dim sectionXml As String = sInfo.GetRawXml()

    Console.WriteLine("Section xml:")
    Console.WriteLine(sectionXml)

End Sub

适用于