Redigeeri

Jagamisviis:


SqlString Struct

Definition

Represents a variable-length stream of characters to be stored in or retrieved from the database. SqlString has a different underlying data structure from its corresponding .NET String data type.

public value class SqlString : IComparable, System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
public value class SqlString : IComparable, IEquatable<System::Data::SqlTypes::SqlString>, System::Data::SqlTypes::INullable, System::Xml::Serialization::IXmlSerializable
public value class SqlString : IComparable, System::Data::SqlTypes::INullable
public struct SqlString : IComparable, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
public struct SqlString : IComparable, IEquatable<System.Data.SqlTypes.SqlString>, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
public struct SqlString : IComparable, System.Data.SqlTypes.INullable
[System.Serializable]
public struct SqlString : IComparable, System.Data.SqlTypes.INullable, System.Xml.Serialization.IXmlSerializable
type SqlString = struct
    interface INullable
    interface IXmlSerializable
type SqlString = struct
    interface INullable
[<System.Serializable>]
type SqlString = struct
    interface INullable
    interface IXmlSerializable
Public Structure SqlString
Implements IComparable, INullable, IXmlSerializable
Public Structure SqlString
Implements IComparable, IEquatable(Of SqlString), INullable, IXmlSerializable
Public Structure SqlString
Implements IComparable, INullable
Inheritance
SqlString
Attributes
Implements

Remarks

String always uses the default CultureInfo from the current thread, but SqlString contains its own locale Id and compare flags. The comparison result of two SqlString structures is independent of operating system and current thread locale.

When you use SqlString comparison operators, note that if the LCIDs of arguments are different, comparison functions throw an exception because they cannot be compared. For example, the statement

SqlString mySqlString = new SqlString("abc");  

is equivalent to

SqlString mySqlString = new SqlString("abc", CultureInfo.CurrentCulture.LCID);  

Constructors

SqlString(Int32, SqlCompareOptions, Byte[], Boolean)

Initializes a new instance of the SqlString class.

SqlString(Int32, SqlCompareOptions, Byte[], Int32, Int32, Boolean)

Initializes a new instance of the SqlString class.

SqlString(Int32, SqlCompareOptions, Byte[], Int32, Int32)

Initializes a new instance of the SqlString class.

SqlString(Int32, SqlCompareOptions, Byte[])

Initializes a new instance of the SqlString structure using the specified locale id, compare options, and data.

SqlString(String, Int32, SqlCompareOptions)

Initializes a new instance of the SqlString structure using the specified string, locale id, and compare option values.

SqlString(String, Int32)

Initializes a new instance of the SqlString structure using the specified string and locale id values.

SqlString(String)

Initializes a new instance of the SqlString structure using the specified string.

Fields

BinarySort

Specifies that sorts should be based on a characters numeric value instead of its alphabetical value.

BinarySort2

Specifies that sorts should be based on a character's numeric value instead of its alphabetical value.

IgnoreCase

Specifies that SqlString comparisons should ignore case.

IgnoreKanaType

Specifies that the string comparison must ignore the Kana type.

IgnoreNonSpace

Specifies that the string comparison must ignore non-space combining characters, such as diacritics.

IgnoreWidth

Specifies that the string comparison must ignore the character width.

Null

Represents a DBNull that can be assigned to this instance of the SqlString structure.

Properties

CompareInfo

Gets the CompareInfo object that defines how string comparisons should be performed for this SqlString structure.

CultureInfo

Gets the CultureInfo structure that represents information about the culture of this SqlString object.

IsNull

Indicates whether this SqlString structure is null.

LCID

Specifies the geographical locale and language for the SqlString structure.

SqlCompareOptions

A combination of one or more of the SqlCompareOptions enumeration values that represent the way in which this SqlString should be compared to other SqlString structures.

Value

Gets the string that is stored in this SqlString structure. This property is read-only.

Methods

Add(SqlString, SqlString)

Concatenates two specified SqlString values to create a new SqlString structure.

Clone()

Creates a copy of this SqlString object.

CompareOptionsFromSqlCompareOptions(SqlCompareOptions)

Gets the CompareOptions enumeration equivalent of the specified SqlCompareOptions value.

CompareTo(Object)

Compares this SqlString object to the supplied Object and returns an indication of their relative values.

CompareTo(SqlString)

Compares this SqlString instance to the supplied SqlString and returns an indication of their relative values.

Concat(SqlString, SqlString)

Concatenates the two specified SqlString structures.

Equals(Object)

Compares the supplied object parameter to the Value property of the SqlString object.

Equals(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether they are equal.

Equals(SqlString)

Indicates whether the current instance is equal to another instance of the same type.

GetHashCode()

Gets the hash code for this instance.

GetNonUnicodeBytes()

Gets an array of bytes, that contains the contents of the SqlString in ANSI format.

GetUnicodeBytes()

Gets an array of bytes, that contains the contents of the SqlString in Unicode format.

GetXsdType(XmlSchemaSet)

Returns the XML Schema definition language (XSD) of the specified XmlSchemaSet.

GreaterThan(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is greater than the second.

GreaterThanOrEqual(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is greater than or equal to the second.

LessThan(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is less than the second.

LessThanOrEqual(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is less than or equal to the second.

NotEquals(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether they are not equal.

ToSqlBoolean()

Converts this SqlString structure to SqlBoolean.

ToSqlByte()

Converts this SqlString structure to SqlByte.

ToSqlDateTime()

Converts this SqlString structure to SqlDateTime.

ToSqlDecimal()

Converts this SqlString structure to SqlDecimal.

ToSqlDouble()

Converts this SqlString structure to SqlDouble.

ToSqlGuid()

Converts this SqlString structure to SqlGuid.

ToSqlInt16()

Converts this SqlString structure to SqlInt16.

ToSqlInt32()

Converts this SqlString structure to SqlInt32.

ToSqlInt64()

Converts this SqlString structure to SqlInt64.

ToSqlMoney()

Converts this SqlString structure to SqlMoney.

ToSqlSingle()

Converts this SqlString structure to SqlSingle.

ToString()

Converts a SqlString object to a String.

Operators

Addition(SqlString, SqlString)

Concatenates the two specified SqlString structures.

Equality(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether they are equal.

Explicit(SqlBoolean to SqlString)

Converts the specified SqlBoolean structure to SqlString.

Explicit(SqlByte to SqlString)

Converts the specified SqlByte structure to SqlString.

Explicit(SqlDateTime to SqlString)

Converts the specified SqlDateTime parameter to SqlString.

Explicit(SqlDecimal to SqlString)

Converts the specified SqlDecimal parameter to SqlString.

Explicit(SqlDouble to SqlString)

Converts the specified SqlDouble parameter to SqlString.

Explicit(SqlGuid to SqlString)

Converts the specified SqlGuid parameter to SqlString.

Explicit(SqlInt16 to SqlString)

Converts the specified SqlInt16 parameter to SqlString.

Explicit(SqlInt32 to SqlString)

Converts the specified SqlInt32 parameter to SqlString.

Explicit(SqlInt64 to SqlString)

Converts the specified SqlInt64 parameter to SqlString.

Explicit(SqlMoney to SqlString)

Converts the specified SqlMoney parameter to SqlString.

Explicit(SqlSingle to SqlString)

Converts the specified SqlSingle parameter to SqlString.

Explicit(SqlString to String)

Converts a SqlString to a String.

GreaterThan(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is greater than the second.

GreaterThanOrEqual(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is greater than or equal to the second.

Implicit(String to SqlString)

Converts the String parameter to a SqlString.

Inequality(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether they are not equal.

LessThan(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is less than the second.

LessThanOrEqual(SqlString, SqlString)

Performs a logical comparison of the two SqlString operands to determine whether the first is less than or equal to the second.

Explicit Interface Implementations

IXmlSerializable.GetSchema()

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.ReadXml(XmlReader)

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

IXmlSerializable.WriteXml(XmlWriter)

This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Applies to

See also