Пример #1
0
 public static int ToInt(this string txt)
 {
     return(StringExtensions.ToNumber <int>(txt, (string s) => Convert.ToInt32(Convert.ToDouble(s)), 0));
 }
Пример #2
0
 public static double ToDouble(this string txt)
 {
     return(StringExtensions.ToNumber <double>(txt, (string s) => Convert.ToDouble(s), 0.0));
 }
Пример #3
0
 public static double ToFloat(this string txt)
 {
     return((double)StringExtensions.ToNumber <float>(txt, (string s) => Convert.ToSingle(s), 0f));
 }
Пример #4
0
 public static double ToLong(this string txt)
 {
     return((double)StringExtensions.ToNumber <long>(txt, (string s) => Convert.ToInt64(s), 0L));
 }