XCData Constructor (String)

Initializes a new instance of the XCData class.

Namespace:  System.Xml.Linq
Assembly:  System.Xml.Linq (in System.Xml.Linq.dll)

public XCData(
	string value


Type: System.String
A string that contains the value of the XCData node.

The following example creates an element that contains a CDATA node.

StringBuilder output = new StringBuilder();
XElement root = new XElement("Root",
    new XCData("Some content")
output.Append(root + Environment.NewLine);

OutputTextBlock.Text = output.ToString();


Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions