SectionInformation.GetRawXml Method ()

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Returns an XML node object that represents the associated configuration-section object.

Namespace:   System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

public string GetRawXml()

Return Value

Type: System.String

The XML representation for this configuration section.

Exception Condition
InvalidOperationException

This configuration object is locked and cannot be edited.

The following example shows how to use the GetRawXml method.

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

    string sectionXml =
        sInfo.GetRawXml();

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

}

.NET Framework
Available since 2.0
Return to top
Show: