SqlBytes Constructors

Definition

Initializes a new instance of the SqlBytes class.

Overloads

SqlBytes()

Initializes a new instance of the SqlBytes class.

SqlBytes(Byte[])

Initializes a new instance of the SqlBytes class based on the specified byte array.

SqlBytes(SqlBinary)

Initializes a new instance of the SqlBytes class based on the specified SqlBinary value.

SqlBytes(Stream)

Initializes a new instance of the SqlBytes class based on the specified Stream value.

SqlBytes()

Source:
SQLBytes.cs
Source:
SQLBytes.cs
Source:
SQLBytes.cs

Initializes a new instance of the SqlBytes class.

C#
public SqlBytes();

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

SqlBytes(Byte[])

Source:
SQLBytes.cs
Source:
SQLBytes.cs
Source:
SQLBytes.cs

Initializes a new instance of the SqlBytes class based on the specified byte array.

C#
public SqlBytes(byte[]? buffer);
C#
public SqlBytes(byte[] buffer);

Parameters

buffer
Byte[]

The array of unsigned bytes.

Remarks

If a null reference is passed in, the instance is set to null.

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

SqlBytes(SqlBinary)

Source:
SQLBytes.cs
Source:
SQLBytes.cs
Source:
SQLBytes.cs

Initializes a new instance of the SqlBytes class based on the specified SqlBinary value.

C#
public SqlBytes(System.Data.SqlTypes.SqlBinary value);

Parameters

value
SqlBinary

A SqlBinary value.

Remarks

If a null reference is passed in, the instance is set to null.

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

SqlBytes(Stream)

Source:
SQLBytes.cs
Source:
SQLBytes.cs
Source:
SQLBytes.cs

Initializes a new instance of the SqlBytes class based on the specified Stream value.

C#
public SqlBytes(System.IO.Stream? s);
C#
public SqlBytes(System.IO.Stream s);

Parameters

s
Stream

A Stream.

Remarks

If a null reference is passed in, the instance is set to null.

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