In This Article

SimpleName Class

Represents a simple name with optional type arguments, which is a component of an IQualifiedName.

public class SimpleName : ISimpleName
Inheritance:
object object
Implements:
ISimpleName

Constructors

SimpleName(SimpleName)

Initializes an instance of the class.

public SimpleName(SimpleName simpleName)
Parameter Type Description
simpleName SimpleName

The AST simple name to examine.

SimpleName(string, params IQualifiedName[]?)

Initializes an instance of the class.

public SimpleName(string text, params IQualifiedName[]? typeArguments)
Parameter Type Description
text string

The text value of the identifier.

typeArguments IQualifiedName[]

The collection of optional generic type arguments for the identifier.

Properties

HasTypeArguments

Indicates whether the identifier has at least one type argument.

public bool HasTypeArguments { get; }

Property Value

bool

Text

The text value of the identifier.

public string Text { get; }

Property Value

string

TypeArguments

The collection of optional generic type arguments for the identifier.

public IList<IQualifiedName> TypeArguments { get; }

Property Value

IList<IQualifiedName>

Methods

Clone()

Returns a deep clone of the object.

public ISimpleName Clone()

Returns

ISimpleName:

The object that was created.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameter Type Description
obj object

The object to compare with the current object.

Returns

bool:

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int:

A hash code for the current object.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Inherited Members

Extension Methods