XText Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the XText class.
Overloads
XText(String) |
Initializes a new instance of the XText class. |
XText(XText) |
Initializes a new instance of the XText class from another XText object. |
XText(String)
- Source:
- XText.cs
- Source:
- XText.cs
- Source:
- XText.cs
Initializes a new instance of the XText class.
public:
XText(System::String ^ value);
public XText (string value);
new System.Xml.Linq.XText : string -> System.Xml.Linq.XText
Public Sub New (value As String)
Parameters
Examples
The following example creates an element that contains a text node.
XElement root = new XElement("Root", "Some text");
Console.WriteLine(root);
Dim root As XElement = <Root>Some text</Root>
Console.WriteLine(root)
This example produces the following output:
<Root>Some text</Root>
Remarks
You typically do not create text nodes by using the XText constructors. When you pass text content when constructing an XElement, text nodes are automatically created.
See also
Applies to
XText(XText)
- Source:
- XText.cs
- Source:
- XText.cs
- Source:
- XText.cs
public:
XText(System::Xml::Linq::XText ^ other);
public XText (System.Xml.Linq.XText other);
new System.Xml.Linq.XText : System.Xml.Linq.XText -> System.Xml.Linq.XText
Public Sub New (other As XText)
Parameters
Remarks
This constructor is primarily used internally to make a deep copy of an XML tree.
See also
Applies to
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin