System.Data.SqlTypes.SqlSingle.Parse C# (CSharp) Method

Parse() public static method

public static Parse ( string s ) : SqlSingle
s string
return SqlSingle
        public static SqlSingle Parse(string s)
        {
            if (s == SQLResource.s_nullString)
                return SqlSingle.Null;
            else
                return new SqlSingle(float.Parse(s, CultureInfo.InvariantCulture));
        }

Usage Example

Example #1
0
 /**
  * Converts this SqlString structure to SqlSingle.
  * @return A SqlDouble structure whose Value equals the Value of this SqlString structure.
  */
 public SqlSingle ToSqlSingle()
 {
     return(SqlSingle.Parse(_value));
 }