Class CSNumbers
Provides C# number parsing
Inheritance
System.Object
CSNumbers
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.CodeAnalysis.CSharp
Assembly: Azos.dll
Syntax
public static class CSNumbers
Fields
S_DECIMAL
Declaration
public const string S_DECIMAL = "M"
Field Value
| Type | Description |
|---|---|
| System.String |
S_DOUBLE
Declaration
public const string S_DOUBLE = "D"
Field Value
| Type | Description |
|---|---|
| System.String |
S_FLOAT
Declaration
public const string S_FLOAT = "F"
Field Value
| Type | Description |
|---|---|
| System.String |
S_LONG
Declaration
public const string S_LONG = "L"
Field Value
| Type | Description |
|---|---|
| System.String |
S_UINT
Declaration
public const string S_UINT = "U"
Field Value
| Type | Description |
|---|---|
| System.String |
S_ULONG1
Declaration
public const string S_ULONG1 = "UL"
Field Value
| Type | Description |
|---|---|
| System.String |
S_ULONG2
Declaration
public const string S_ULONG2 = "LU"
Field Value
| Type | Description |
|---|---|
| System.String |
Methods
Convert(String, out CSTokenType)
Tries to convert string to number, returns null if conversion could not be made. Raises exception if operand is wider than specifier allows
Declaration
public static object Convert(string str, out CSTokenType type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | str | |
| CSTokenType | type |
Returns
| Type | Description |
|---|---|
| System.Object |