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 a new instance of the SimpleName class.

public SimpleName(SimpleName simpleName)
Parameter Type Description
simpleName SimpleName

The AST simple name to examine.

SimpleName(string, params IQualifiedName[])

Initializes a new instance of the SimpleName 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

Gets whether the identifier has at least one type argument.

public bool HasTypeArguments { get; }

Property Value

bool:

true if the identifier has at least one type argument; otherwise, false.

Text

Gets the text value of the identifier.

public string Text { get; }

Property Value

string:

The text value of the identifier.

TypeArguments

Gets the collection of optional generic type arguments for the identifier.

public IList<IQualifiedName> TypeArguments { get; }

Property Value

IList<IQualifiedName>:

The collection of optional generic type arguments for the identifier.

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 to the current Object.

Returns

bool:

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

GetHashCode()

Returns a hash code for this object.

public override int GetHashCode()

Returns

int:

An integer value that specifies a hash value for this object.

ToString()

Returns a String that represents the current Object.

public override string ToString()

Returns

string:

A String that represents the current Object.

Inherited Members