C# Класс RTools.Util.IntToken

Token type for integer tokens. This handles both Int32 and Int64.
Наследование: Token
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Equals ( object other ) : bool

Override, see base Token

GetHashCode ( ) : int

Override, see base Token

IntToken ( int i ) : System

Constructor with the specified value.

IntToken ( int i, int line ) : System

Constructor with the specified value and line number.

IntToken ( long i ) : System

Constructor with the specified value.

IntToken ( long l, int line ) : System

Constructor for a 64 bit int

IntToken ( string s ) : System

Constructor with the specified value.

IntToken ( string s, int line ) : System

Constructor with the specified value and line number.

ParseHex ( string s, int lineNumber ) : IntToken

Parse a string known to be a hex string. This is faster than Parse which doesn't assume the number is Hex. This will throw an exception if the input number isn't hex.

ToDebugString ( ) : string

Override, see base Token

ToString ( ) : string

Override, see base Token

Приватные методы

Метод Описание
Parse ( string s ) : void

Convert the input string to an integer, if possible

Описание методов

Equals() публичный Метод

Override, see base Token
public Equals ( object other ) : bool
other object
Результат bool

GetHashCode() публичный Метод

Override, see base Token
public GetHashCode ( ) : int
Результат int

IntToken() публичный Метод

Constructor with the specified value.
public IntToken ( int i ) : System
i int
Результат System

IntToken() публичный Метод

Constructor with the specified value and line number.
public IntToken ( int i, int line ) : System
i int
line int
Результат System

IntToken() публичный Метод

Constructor with the specified value.
public IntToken ( long i ) : System
i long
Результат System

IntToken() публичный Метод

Constructor for a 64 bit int
public IntToken ( long l, int line ) : System
l long
line int
Результат System

IntToken() публичный Метод

Constructor with the specified value.
public IntToken ( string s ) : System
s string
Результат System

IntToken() публичный Метод

Constructor with the specified value and line number.
public IntToken ( string s, int line ) : System
s string
line int
Результат System

ParseHex() публичный статический Метод

Parse a string known to be a hex string. This is faster than Parse which doesn't assume the number is Hex. This will throw an exception if the input number isn't hex.
public static ParseHex ( string s, int lineNumber ) : IntToken
s string The hex number as a string.
lineNumber int The line where this token was found.
Результат IntToken

ToDebugString() публичный Метод

Override, see base Token
public ToDebugString ( ) : string
Результат string

ToString() публичный Метод

Override, see base Token
public ToString ( ) : string
Результат string