System.Data.SqlTypes (system.data.dll) |
struct |
A structure that represents a variable-length stream of characters.
You can use this structure for the following SQL Server data types:
char , nchar ,
varchar , nvarchar ,
ntext , text , and
sysname . You can configure how
SqlString instances should be compared by setting
a combination of values from the SqlCompareOptions
enumeration for the SqlCompareOptions property.
The built-in methods include one for string concatenation
(Concat( ) ). To determine the geographical locale
and language for this structure, use the LCID
property, and for information about culture-specific settings (such
as culture name, writing system, and calendar) use the
CultureInfo property.
public struct SqlString : INullable, IComparable {
// Public Constructors
public SqlString(int lcid, SqlCompareOptions compareOptions, byte[ ] data);
public SqlString(int lcid, SqlCompareOptions compareOptions, byte[ ] data, bool fUnicode);
public SqlString(int lcid, SqlCompareOptions compareOptions, byte[ ] data, int index, int count);
public SqlString(int lcid, SqlCompareOptions compareOptions, byte[ ] data, int index, int count, bool fUnicode);
public SqlString( string data);
public SqlString( string data, int lcid);
public SqlString(string data, int lcid, SqlCompareOptions compareOptions);
// Public Static Fields
public static readonly int BinarySort; // =32768
public static readonly int IgnoreCase; // =1
public static readonly int IgnoreKanaType; // =8
public static readonly int IgnoreNonSpace; // =2
public static readonly int IgnoreWidth; // =16
public static readonly SqlString Null; // =Null
// Public Instance Properties
public CompareInfo CompareInfo{get; }
public CultureInfo CultureInfo{get; }
public bool IsNull{get; } // implements INullable
public int LCID{get; }
public SqlCompareOptions SqlCompareOptions{get; }
public string Value{get; }
// Public Static Methods
public static CompareOptions CompareOptionsFromSqlCompareOptions(SqlCompareOptions compareOptions);
public static SqlString Concat( SqlString x, SqlString y);
public static SqlBoolean Equals(SqlString x, SqlString y);
public static SqlBoolean GreaterThan(SqlString x, SqlString y);
public static SqlBoolean GreaterThanOrEqual(SqlString x, SqlString y);
public static SqlBoolean LessThan(SqlString x, SqlString y);
public static SqlBoolean LessThanOrEqual(SqlString x, SqlString y);
public static SqlBoolean NotEquals(SqlString x, SqlString y);
public static SqlString operator +(SqlString x, SqlString y);
public static SqlBoolean operator !=(SqlString x, SqlString y);
public static SqlBoolean operator <(SqlString x, SqlString y);
public static SqlBoolean operator <=(SqlString x, SqlString y);
public static SqlBoolean operator ==(SqlString x, SqlString y);
public static SqlBoolean operator >(SqlString x, SqlString y);
public static SqlBoolean operator >=(SqlString x, SqlString y);
public static explicit operator SqlString( SqlBoolean x);
public static explicit operator SqlString( SqlByte x);
public static explicit operator SqlString( SqlDateTime x);
public static explicit operator SqlString( SqlDecimal x);
public static explicit operator SqlString( SqlDouble x);
public static explicit operator SqlString( SqlGuid x);
public static explicit operator SqlString( SqlInt16 x);
public static explicit operator SqlString( SqlInt32 x);
public static explicit operator SqlString( SqlInt64 x);
public static explicit operator SqlString( SqlMoney x);
public static explicit operator SqlString( SqlSingle x);
public static explicit operator string( SqlString x);
public static implicit operator SqlString( string x);
// Public Instance Methods
public SqlString Clone( );
public int CompareTo( object value); // implements IComparable
public override bool Equals( object value); // overrides ValueType
public override int GetHashCode( ); // overrides ValueType
public byte[ ] GetNonUnicodeBytes( );
public byte[ ] GetUnicodeBytes( );
public SqlBoolean ToSqlBoolean( );
public SqlByte ToSqlByte( );
public SqlDateTime ToSqlDateTime( );
public SqlDecimal ToSqlDecimal( );
public SqlDouble ToSqlDouble( );
public SqlGuid ToSqlGuid( );
public SqlInt16 ToSqlInt16( );
public SqlInt32 ToSqlInt32( );
public SqlInt64 ToSqlInt64( );
public SqlMoney ToSqlMoney( );
public SqlSingle ToSqlSingle( );
public override string ToString( ); // overrides ValueType
}
Hierarchy
System.Object
System.ValueType SqlString(INullable, System.IComparable)
Returned By
System.Data.SqlClient.SqlDataReader.GetSqlString( )
, SqlBoolean.ToSqlString( )
, SqlByte.ToSqlString( )
, SqlDateTime.ToSqlString( )
, SqlDecimal.ToSqlString( )
, SqlDouble.ToSqlString( )
, SqlGuid.ToSqlString( )
, SqlInt16.ToSqlString( )
, SqlInt32.ToSqlString( )
, SqlInt64.ToSqlString( )
, SqlMoney.ToSqlString( )
, SqlSingle.ToSqlString( )
|