Methods for convert the String to some .NET data types.
Casting
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| TryParse | 1 | Try parse of the enum value. |
| ScriptValue | 1 | Size object to string expression |
| Expression | 2 | width,height |
| PointParser | 1 | Parse Point from a given string expression |
| FloatPointParser | 1 | Parse PointF from a given string expression |
| SizeParser | 1 | Parse Size from a given string expression |
| FloatSizeParser | 1 | Parse SizeF from a given string expression |
| AsBaseType | 1 | DirectCast(obj, T). 这个函数主要是为了解决Class类型之间的继承类型的转换,例如子类型向基础类型转换 |
| As | 1 | Cast array type |
| RegexParseDouble | 1 | Parsing a real number from the expression text by using the regex expression Casting.RegexpFloat. |
| ParseNumeric | 1 | Will processing value NaN automatically and strip for the comma, percentage expression. |
| CastChar | 1 | 字符串是空值会返回空字符 |
| CastInteger | 1 | 出错会返回默认是0 |
| CastDate | 1 | 支持日期字符串和unix timstamp对DateTime的转换 |
| CastCommandLine | 1 | CLITools.TryParse()) |
| CastImage | 1 | GraphicsExtensions.LoadImage()) |
| TryParse | 1 | |
| As | 1 | |
| NumericRangeParser | 1 | |
| AsBaseType | 1 | |
| CastLong | 1 | |
| CastCharArray | 1 | |
| CastStringBuilder | 1 | |
| CastFileInfo | 1 | |
| CastFont | 1 | |
| CastIPEndPoint | 1 | |
| CastLogFile | 1 | |
| CastProcess | 1 | |
| CastSingle | 1 | |
| CastRegexOptions | 1 |
03 Fields
| Name | Overloads | Summary |
|---|---|---|
| RegexpDouble | 2 | 用于解析出任意实数的正则表达式 |
| ScientificNotation | 1 | |
| RegexpFloat | 1 | |
| RegexInteger | 1 |
04 Members
``0)Try parse of the enum value.
| Name | Description |
|---|---|
T | This generic type should be an |
| Name | Type | Description |
|---|---|---|
expression | Match | - |
[default] | ``0 | - |
Size)Size object to string expression
| Name | Type | Description |
|---|---|---|
size | Size | - |
Size)width,height
| Name | Type | Description |
|---|---|---|
size | Size | - |
SizeF)width,height
| Name | Type | Description |
|---|---|---|
size | SizeF | - |
String)Parse Point from a given string expression
| Name | Type | Description |
|---|---|---|
pt$ | String | - |
String)Parse PointF from a given string expression
| Name | Type | Description |
|---|---|---|
pt$ | String | - |
String)Parse Size from a given string expression
| Name | Type | Description |
|---|---|---|
pt$ | String | - |
String)Parse SizeF from a given string expression
| Name | Type | Description |
|---|---|---|
pt$ | String | - |
``0)DirectCast(obj, T). 这个函数主要是为了解决Class类型之间的继承类型的转换,例如子类型向基础类型转换
可能会和向量的As类型转换有冲突
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
obj | ``0 | - |
IEnumerable(Of ``0))Cast array type
| Name | Description |
|---|---|
T | |
TOut |
| Name | Type | Description |
|---|---|---|
list | IEnumerable(Of ``0) | 在这里使用向量而非使用通用接口是因为和单个元素的As转换有冲突 |
String)Parsing a real number from the expression text by using the regex expression Casting.RegexpFloat. (使用正则表达式解析目标字符串对象之中的一个实数)
| Name | Type | Description |
|---|---|---|
s | String | - |
String)Will processing value NaN automatically and strip for the comma, percentage expression.
this function will mapping factor string NaN and NA as Double.NaN
| Name | Type | Description |
|---|---|---|
s | String |
|
String)字符串是空值会返回空字符
| Name | Type | Description |
|---|---|---|
obj | String | - |
String)出错会返回默认是0
| Name | Type | Description |
|---|---|---|
obj | String | - |
String)支持日期字符串和unix timstamp对DateTime的转换
| Name | Type | Description |
|---|---|---|
obj | String | - |
String)| Name | Type | Description |
|---|---|---|
obj | String | - |
String)| Name | Type | Description |
|---|---|---|
path | String | - |
用于解析出任意实数的正则表达式
T)IEnumerable)String)TIn)String)String)String)String)String)String)String)String)String)String)