SqlString Structure
![]() |
---|
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience. |
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 Framework String data type.
Assembly: System.Data (in System.Data.dll)
Name | Description | |
---|---|---|
![]() | SqlString(Int32, SqlCompareOptions, Byte[]) | Initializes a new instance of the SqlString structure using the specified locale id, compare options, and data. |
![]() | SqlString(Int32, SqlCompareOptions, Byte[], 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[], Int32, Int32, Boolean) | Initializes a new instance of the SqlString class. |
![]() | SqlString(String) | Initializes a new instance of the SqlString structure using the specified string. |
![]() | SqlString(String, Int32) | Initializes a new instance of the SqlString structure using the specified string and locale id values. |
![]() | SqlString(String, Int32, SqlCompareOptions) | Initializes a new instance of the SqlString structure using the specified string, locale id, and compare option values. |
Name | Description | |
---|---|---|
![]() | 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. |
Name | Description | |
---|---|---|
![]() ![]() | 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 equilvalent 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.(Overrides ValueType.Equals(Object).) |
![]() ![]() | Equals(SqlString, SqlString) | Performs a logical comparison of the two SqlString operands to determine whether they are equal. |
![]() | GetHashCode() | Gets the hash code for this instance.(Overrides ValueType.GetHashCode().) |
![]() | GetNonUnicodeBytes() | Gets an array of bytes, that contains the contents of the SqlString in ANSI format. |
![]() | GetType() | |
![]() | 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.(Overrides ValueType.ToString().) |
Name | Description | |
---|---|---|
![]() ![]() | 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. |
Name | Description | |
---|---|---|
![]() ![]() | 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. |
Name | Description | |
---|---|---|
![]() ![]() | 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. |
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);
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.