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

Parse() public static method

public static Parse ( string s ) : SqlInt16
s string
return SqlInt16
        public static SqlInt16 Parse(string s)
        {
            if (s == SQLResource.s_nullString)
                return SqlInt16.Null;
            else
                return new SqlInt16(short.Parse(s, null));
        }

Usage Example

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