New to Telerik UI for WinForms? Start a free 30-day trial

Identifies a code language by name for registering and resolving language-specific syntax taggers with CodeFormatter.

Definition

Namespace:Telerik.WinForms.Documents.Model.Code

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class CodeLanguage : IEquatable<CodeLanguage>

Inheritance: objectCodeLanguage

Implements: IEquatable<CodeLanguage>

Constructors

Initializes a language identifier that can be registered with a CodeFormatter.

C#
public CodeLanguage(string name)
Parameters:namestring

The non-null language name used for formatter lookup and equality.

Properties

Gets the language name used for formatter lookup and case-sensitive equality.

C#
public string Name { get; }

Methods

Determines whether another language identifier has the same case-sensitive name.

C#
public bool Equals(CodeLanguage other)
Parameters:otherCodeLanguage

The language identifier to compare with this instance.

Returns:

bool

true if other has the same name; otherwise, false.

Implements: IEquatable<CodeLanguage>.Equals(CodeLanguage)

Determines whether the specified object is a CodeLanguage with the same case-sensitive name.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with this instance.

Returns:

bool

true if obj is a language identifier with the same name; otherwise, false.

Overrides: object.Equals(object)

Returns a hash code derived from Name, consistent with the name-based equality implementation.

C#
public override int GetHashCode()
Returns:

int

The hash code for this language identifier.

Overrides: object.GetHashCode()