XNamespace.Implicit(String to XNamespace) Operator
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.
Important
This API is not CLS-compliant.
Converts a string containing a Uniform Resource Identifier (URI) to an XNamespace.
public:
static operator System::Xml::Linq::XNamespace ^(System::String ^ namespaceName);
[System.CLSCompliant(false)]
public static implicit operator System.Xml.Linq.XNamespace(string namespaceName);
[System.CLSCompliant(false)]
public static implicit operator System.Xml.Linq.XNamespace?(string? namespaceName);
[<System.CLSCompliant(false)>]
static member op_Implicit : string -> System.Xml.Linq.XNamespace
Public Shared Widening Operator CType (namespaceName As String) As XNamespace
Parameters
Returns
An XNamespace constructed from the URI string.
- Attributes
Examples
The following example shows the initialization of an XNamespace variable by assigning a string to it.
XNamespace aw = "http://www.adventure-works.com";
Console.WriteLine(aw);
Imports <xmlns="http://www.adventure-works.com">
Module Module1
Sub Main()
Dim aw As XNamespace = GetXmlNamespace()
Console.WriteLine(aw)
End Sub
End Module
This example produces the following output:
http://www.adventure-works.com
Applies to
See also
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET