[ Team LiB ] Previous Section Next Section

SqlInt16

System.Data.SqlTypes (system.data.dll) struct

A structure that represents a 16-bit signed integer that can contain a value ranging from 215 (-32,768) to 215-1 (32,767). It maps to the SQL Server smallint data type.

public struct SqlInt16 : INullable, IComparable {
// Public Constructors
   public SqlInt16( short value);  
// Public Static Fields
   public static readonly SqlInt16 MaxValue;          // =32767
   public static readonly SqlInt16 MinValue;          // =-32768
   public static readonly SqlInt16 Null;              // =Null
   public static readonly SqlInt16 Zero;              // =0
// Public Instance Properties
   public bool IsNull{get; }                          // implements INullable
   public short Value{get; } 
// Public Static Methods
   public static SqlInt16 Add( SqlInt16 x, SqlInt16 y);  
   public static SqlInt16 BitwiseAnd(SqlInt16 x, SqlInt16 y);  
   public static SqlInt16 BitwiseOr( SqlInt16 x, SqlInt16 y);  
   public static SqlInt16 Divide( SqlInt16 x, SqlInt16 y);  
   public static SqlBoolean Equals( SqlInt16 x, SqlInt16 y);  
   public static SqlBoolean GreaterThan(SqlInt16 x, SqlInt16 y);
   public static SqlBoolean GreaterThanOrEqual(SqlInt16 x, SqlInt16 y);
   public static SqlBoolean LessThan(SqlInt16 x, SqlInt16 y);  
   public static SqlBoolean LessThanOrEqual(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 Mod( SqlInt16 x, SqlInt16 y);  
   public static SqlInt16 Multiply( SqlInt16 x, SqlInt16 y);  
   public static SqlBoolean NotEquals(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 OnesComplement( SqlInt16 x);  
   public static SqlInt16 operator &(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 operator |(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 operator ^(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 operator ~(SqlInt16 x);
   public static SqlInt16 Parse( string s);  
   public static SqlInt16 Subtract( SqlInt16 x, SqlInt16 y);  
   public static SqlInt16 Xor( SqlInt16 x, SqlInt16 y);  
   public static SqlInt16 operator %(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 operator *(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 operator /(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 operator -( SqlInt16 x);  
   public static SqlInt16 operator -(SqlInt16 x, SqlInt16 y);
   public static SqlInt16 operator +(SqlInt16 x, SqlInt16 y);
   public static SqlBoolean operator !=(SqlInt16 x, SqlInt16 y);
   public static SqlBoolean operator <(SqlInt16 x, SqlInt16 y);
   public static SqlBoolean operator <=(SqlInt16 x, SqlInt16 y);
   public static SqlBoolean operator ==(SqlInt16 x, SqlInt16 y);
   public static SqlBoolean operator >(SqlInt16 x, SqlInt16 y);
   public static SqlBoolean operator >=(SqlInt16 x, SqlInt16 y);
   public static explicit operator short( SqlInt16 x);  
   public static explicit operator SqlInt16( SqlBoolean x);  
   public static explicit operator SqlInt16( SqlDecimal x);  
   public static explicit operator SqlInt16( SqlDouble x);  
   public static explicit operator SqlInt16( SqlInt32 x);  
   public static explicit operator SqlInt16( SqlInt64 x);  
   public static explicit operator SqlInt16( SqlMoney x);  
   public static explicit operator SqlInt16( SqlSingle x);  
   public static explicit operator SqlInt16( SqlString x);  
   public static implicit operator SqlInt16( short x);  
   public static implicit operator SqlInt16( SqlByte x);  
// Public Instance Methods
   public int CompareTo( object value);               // implements IComparable
   public override bool Equals( object value);        // overrides ValueType
   public override int GetHashCode(  );               // overrides ValueType
   public SqlBoolean ToSqlBoolean(  );  
   public SqlByte ToSqlByte(  );  
   public SqlDecimal ToSqlDecimal(  );  
   public SqlDouble ToSqlDouble(  );  
   public SqlInt32 ToSqlInt32(  );  
   public SqlInt64 ToSqlInt64(  );  
   public SqlMoney ToSqlMoney(  );  
   public SqlSingle ToSqlSingle(  );  
   public SqlString ToSqlString(  );  
   public override string ToString(  );               // overrides ValueType
}

Hierarchy

System.Object figs/U2192.gif System.ValueType figs/U2192.gif SqlInt16(INullable, System.IComparable)

Returned By

System.Data.SqlClient.SqlDataReader.GetSqlInt16( ) , SqlBoolean.ToSqlInt16( ) , SqlByte.ToSqlInt16( ) , SqlDecimal.ToSqlInt16( ) , SqlDouble.ToSqlInt16( ) , SqlInt32.ToSqlInt16( ) , SqlInt64.ToSqlInt16( ) , SqlMoney.ToSqlInt16( ) , SqlSingle.ToSqlInt16( ) , SqlString.ToSqlInt16( )

    [ Team LiB ] Previous Section Next Section