SqlString Constructors

Definition

Initializes a new instance of the SqlString class.

Overloads

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(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(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)

Source:
SQLString.cs
Source:
SQLString.cs
Source:
SQLString.cs

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

C#
public SqlString(string? data);
C#
public SqlString(string data);

Parameters

data
String

The string to store.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

SqlString(String, Int32)

Source:
SQLString.cs
Source:
SQLString.cs
Source:
SQLString.cs

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

C#
public SqlString(string? data, int lcid);
C#
public SqlString(string data, int lcid);

Parameters

data
String

The string to store.

lcid
Int32

Specifies the geographical locale and language for the new SqlString structure.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

SqlString(Int32, SqlCompareOptions, Byte[])

Source:
SQLString.cs
Source:
SQLString.cs
Source:
SQLString.cs

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

C#
public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, byte[] data);

Parameters

lcid
Int32

Specifies the geographical locale and language for the new SqlString structure.

compareOptions
SqlCompareOptions

Specifies the compare options for the new SqlString structure.

data
Byte[]

The data array to store.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

SqlString(String, Int32, SqlCompareOptions)

Source:
SQLString.cs
Source:
SQLString.cs
Source:
SQLString.cs

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

C#
public SqlString(string? data, int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions);
C#
public SqlString(string data, int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions);

Parameters

data
String

The string to store.

lcid
Int32

Specifies the geographical locale and language for the new SqlString structure.

compareOptions
SqlCompareOptions

Specifies the compare options for the new SqlString structure.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

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

Source:
SQLString.cs
Source:
SQLString.cs
Source:
SQLString.cs

Initializes a new instance of the SqlString class.

C#
public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, byte[] data, bool fUnicode);

Parameters

lcid
Int32

Specifies the geographical locale and language for the new SqlString structure.

compareOptions
SqlCompareOptions

Specifies the compare options for the new SqlString structure.

data
Byte[]

The data array to store.

fUnicode
Boolean

true if Unicode encoded. Otherwise, false.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

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

Source:
SQLString.cs
Source:
SQLString.cs
Source:
SQLString.cs

Initializes a new instance of the SqlString class.

C#
public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, byte[]? data, int index, int count);
C#
public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, byte[] data, int index, int count);

Parameters

lcid
Int32

Specifies the geographical locale and language for the new SqlString structure.

compareOptions
SqlCompareOptions

Specifies the compare options for the new SqlString structure.

data
Byte[]

The data array to store.

index
Int32

The starting index within the array.

count
Int32

The number of characters from index to copy.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

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

Source:
SQLString.cs
Source:
SQLString.cs
Source:
SQLString.cs

Initializes a new instance of the SqlString class.

C#
public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, byte[]? data, int index, int count, bool fUnicode);
C#
public SqlString(int lcid, System.Data.SqlTypes.SqlCompareOptions compareOptions, byte[] data, int index, int count, bool fUnicode);

Parameters

lcid
Int32

Specifies the geographical locale and language for the new SqlString structure.

compareOptions
SqlCompareOptions

Specifies the compare options for the new SqlString structure.

data
Byte[]

The data array to store.

index
Int32

The starting index within the array.

count
Int32

The number of characters from index to copy.

fUnicode
Boolean

true if Unicode encoded. Otherwise, false.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1