Share via


UsingDirectiveSyntax.Name Property

Definition

Returns the name this UsingDirectiveSyntax points at, or null if it does not point at a name. A normal using X.Y.Z; or using static X.Y.Z; will always point at a name and will always return a value for this. However, a using-alias (e.g. using x = ...;) may or may not point at a name and may return null here. An example of when that may happen is the type on the right side of the = is not a name. For example using x = (X.Y.Z, A.B.C);. Here, as the type is a tuple-type there is no name to return.

public:
 property Microsoft::CodeAnalysis::CSharp::Syntax::NameSyntax ^ Name { Microsoft::CodeAnalysis::CSharp::Syntax::NameSyntax ^ get(); };
public Microsoft.CodeAnalysis.CSharp.Syntax.NameSyntax Name { get; }
public Microsoft.CodeAnalysis.CSharp.Syntax.NameSyntax? Name { get; }
member this.Name : Microsoft.CodeAnalysis.CSharp.Syntax.NameSyntax
Public ReadOnly Property Name As NameSyntax

Property Value

Applies to