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
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기