![]() |
Sphyrnidae Common Library
2.0.1
Shared Utilities/Library
|
String custom methods which are used to convert the string to another type More...
Static Public Member Functions | |
static int | ToIntParsed (this string value, string name) |
Converts a string value into an integer, using ParseInt function similar to Javascript (eg. 12ab3 = 12) More... | |
static int | ToIntParsed (this string value, int defaultValue) |
Converts a string value into an integer, using ParseInt function similar to Javascript (eg. 12ab3 = 12) More... | |
static int | ToInt (this string value, string name) |
Converts a string value into an integer More... | |
static int | ToInt (this string value, int defaultValue) |
Converts a string value into an integer More... | |
static ? int | ToNullableInt (this string value, string name) |
Converts a string value into a nullable integer More... | |
static ? int | ToNullableInt (this string value, int? defaultValue=null) |
Converts a string value into a nullable integer More... | |
static short | ToShort (this string value, string name) |
Converts a string value into a short More... | |
static short | ToShort (this string value, short defaultValue) |
Converts a string value into a short More... | |
static ? short | ToNullableShort (this string value, string name) |
Converts a string value into a nullable short More... | |
static ? short | ToNullableShort (this string value, short? defaultValue=null) |
Converts a string value into a nullable short More... | |
static long | ToLong (this string value, string name) |
Converts a string value into a long More... | |
static long | ToLong (this string value, long defaultValue) |
Converts a string value into a long More... | |
static ? long | ToNullableLong (this string value, string name) |
Converts a string value into a nullable long More... | |
static ? long | ToNullableLong (this string value, long? defaultValue=null) |
Converts a string value into a nullable long More... | |
static ulong | ToULong (this string value, string name) |
Converts a string value into a ulong More... | |
static ulong | ToULong (this string value, ulong defaultValue) |
Converts a string value into a ulong More... | |
static ? ulong | ToNullableULong (this string value, string name) |
Converts a string value into a nullable ulong More... | |
static ? ulong | ToNullableULong (this string value, ulong? defaultValue=null) |
Converts a string value into a nullable ulong More... | |
static double | ToDouble (this string value, string name) |
Converts a string value into a double More... | |
static double | ToDouble (this string value, double defaultValue) |
Converts a string value into a double More... | |
static ? double | ToNullableDouble (this string value, string name) |
Converts a string value into a nullable double More... | |
static ? double | ToNullableDouble (this string value, double? defaultValue=null) |
Converts a string value into a nullable double More... | |
static decimal | ToDecimal (this string value, string name) |
Converts a string value into a decimal More... | |
static decimal | ToDecimal (this string value, decimal defaultValue) |
Converts a string value into a decimal More... | |
static ? decimal | ToNullableDecimal (this string value, string name) |
Converts a string value into a nullable decimal More... | |
static ? decimal | ToNullableDecimal (this string value, decimal? defaultValue=null) |
Converts a string value into a nullable decimal More... | |
static float | ToFloat (this string value, string name) |
Converts a string value into a float More... | |
static float | ToFloat (this string value, float defaultValue) |
Converts a string value into a float More... | |
static ? float | ToNullableFloat (this string value, string name) |
Converts a string value into a nullable float More... | |
static ? float | ToNullableFloat (this string value, float? defaultValue=null) |
Converts a string value into a nullable float More... | |
static bool | ToBool (this string value, string name) |
Converts a string into a bool More... | |
static bool | ToBool (this string value, bool defaultValue) |
Converts a string into a bool More... | |
static ? bool | ToNullableBool (this string value, string name) |
Converts a string into a nullable bool More... | |
static ? bool | ToNullableBool (this string value, bool? defaultValue=null) |
Converts a string into a nullable bool More... | |
static DateTime | ToDateTime (this string value, string name) |
Converts a string value into a datetime More... | |
static DateTime | ToDateTime (this string value, DateTime defaultValue) |
Converts a string value into a datetime More... | |
static ? DateTime | ToNullableDateTime (this string value, string name) |
Converts a string value into a nullable datetime More... | |
static ? DateTime | ToNullableDateTime (this string value, DateTime? defaultValue=null) |
Converts a string value into a nullable datetime More... | |
static char | ToChar (this string value, string name) |
Converts a string value into a char More... | |
static char | ToChar (this string value, char defaultValue) |
Converts a string value into a char More... | |
static ? char | ToNullableChar (this string value, string name) |
Converts a string value into a nullable char More... | |
static ? char | ToNullableChar (this string value, char? defaultValue=null) |
Converts a string value into a nullable char More... | |
static Guid | ToGuid (this string value, string name) |
Converts a string value into a Guid More... | |
static Guid | ToGuid (this string value, Guid defaultValue) |
Converts a string value into a Guid More... | |
static ? Guid | ToNullableGuid (this string value, string name) |
Converts a string value into a nullable Guid More... | |
static ? Guid | ToNullableGuid (this string value, Guid? defaultValue=null) |
Converts a string value into a nullable Guid More... | |
static T | ToEnum< T > (this string str) |
Casts a string to an enum More... | |
static T | ToEnum< T > (this string str, T defaultValue) |
Casts a string to an enum More... | |
static Color | ToColor (this string value, string name) |
Converts a string value into a Color More... | |
static Color | ToColor (this string value, Color defaultValue) |
Converts a string value into a Color More... | |
static ? Color | ToNullableColor (this string value, string name) |
Converts a string value into a Color More... | |
static ? Color | ToNullableColor (this string value, Color? defaultValue=null) |
Converts a string value into a Color More... | |
String custom methods which are used to convert the string to another type
|
static |
Converts a string into a bool
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string into a bool
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a char
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a char
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a Color
value | The string to convert |
defaultValue | If the value is somehow bad, this will be returned instead |
|
static |
Converts a string value into a Color
value | The string to convert |
name | The name of the thing being converted (in case of error) |
|
static |
Converts a string value into a datetime
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a datetime
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a decimal
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a decimal
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a double
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a double
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Casts a string to an enum
T | An enumeration |
str | The value of the enumeration to check |
T | : | struct | |
T | : | IConvertible |
|
static |
Casts a string to an enum
T | An enumeration |
str | The value of the enumeration to check |
defaultValue | If can not find a match, this will be returned |
T | : | struct | |
T | : | IConvertible | |
T | : | Enum.TryParse | |
T | : | str | |
T | : | true | |
T | : | out | |
T | : | T | |
T | : | myEnum | |
T | : | defaultValue | |
T | : | myEnum |
|
static |
Converts a string value into a float
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a float
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a Guid
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a Guid
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into an integer
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into an integer
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into an integer, using ParseInt function similar to Javascript (eg. 12ab3 = 12)
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into an integer, using ParseInt function similar to Javascript (eg. 12ab3 = 12)
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a long
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a long
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string into a nullable bool
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string into a nullable bool
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable char
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable char
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a Color
value | The string to convert |
defaultValue | If the value is somehow bad, this will be returned instead |
|
static |
Converts a string value into a Color
value | The string to convert |
name | The name of the thing being converted (in case of error) |
|
static |
Converts a string value into a nullable datetime
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable datetime
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable decimal
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable decimal
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable double
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable double
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable float
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable float
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable Guid
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable Guid
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable integer
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable integer
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable long
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable long
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable short
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a nullable short
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable ulong
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a nullable ulong
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a short
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |
|
static |
Converts a string value into a short
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a ulong
value | The string to convert |
name | The name of the thing being converted (in case of error, a nice exception will be thrown) |
|
static |
Converts a string value into a ulong
value | The string to convert |
defaultValue | If the 'value' is somehow bad, this will be returned instead |