XNamespace.ToString Méthode

Définition

Retourne l'URI de ce XNamespace.Returns the URI of this XNamespace.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Retours

String

URI de ce XNamespace.The URI of this XNamespace.

Exemples

The following example uses this method to print a namespace on the console.

XNamespace aw = "http://www.adventure-works.com";  
Console.WriteLine("{0}", aw.ToString());  
Imports <xmlns="http://www.adventure-works.com">  

Module Module1  
    Sub Main()  
        Dim aw As XNamespace = GetXmlNamespace()  
        Console.WriteLine("{0}", aw)  
    End Sub  
End Module  

Cet exemple génère la sortie suivante :This example produces the following output:

http://www.adventure-works.com  

S’applique à

Voir aussi