Edit

Share via


BlobBuilder.WriteBytes Method

Definition

Overloads

WriteBytes(Byte[], Int32, Int32)

Writes a specified number of bytes starting at a specified index in a byte array to the builder.

WriteBytes(Byte*, Int32)

Writes a specified number of bytes from a buffer to the builder.

WriteBytes(ImmutableArray<Byte>, Int32, Int32)

Writes a specified number of bytes starting at a specified index of an immutable array to the builder.

WriteBytes(ImmutableArray<Byte>)

Writes the contents of an immutable byte array to the builder.

WriteBytes(Byte[])

Writes the contents of a byte array to the builder.

WriteBytes(Byte, Int32)

Writes a specified number of occurrences of a byte value to the builder.

WriteBytes(Byte[], Int32, Int32)

Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs

Writes a specified number of bytes starting at a specified index in a byte array to the builder.

public void WriteBytes(byte[] buffer, int start, int byteCount);

Parameters

buffer
Byte[]
start
Int32
byteCount
Int32

The number of bytes to write.

Exceptions

buffer is null.

The range specified by start and byteCount falls outside of the bounds of buffer.

The builder is not writable; it has been linked with another one.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

WriteBytes(Byte*, Int32)

Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs

Writes a specified number of bytes from a buffer to the builder.

public void WriteBytes(byte* buffer, int byteCount);

Parameters

buffer
Byte*
byteCount
Int32

The number of bytes to write.

Exceptions

buffer is null.

byteCount is negative.

The builder is not writable, it has been linked with another one.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

WriteBytes(ImmutableArray<Byte>, Int32, Int32)

Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs

Writes a specified number of bytes starting at a specified index of an immutable array to the builder.

public void WriteBytes(System.Collections.Immutable.ImmutableArray<byte> buffer, int start, int byteCount);

Parameters

start
Int32
byteCount
Int32

The number of bytes to write.

Exceptions

buffer is null.

The range specified by start and byteCount falls outside of the bounds of the buffer.

The builder is not writable; it has been linked with another one.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

WriteBytes(ImmutableArray<Byte>)

Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs

Writes the contents of an immutable byte array to the builder.

public void WriteBytes(System.Collections.Immutable.ImmutableArray<byte> buffer);

Parameters

buffer
ImmutableArray<Byte>

The array to write.

Exceptions

buffer is null.

The builder is not writable; it has been linked with another one.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

WriteBytes(Byte[])

Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs

Writes the contents of a byte array to the builder.

public void WriteBytes(byte[] buffer);

Parameters

buffer
Byte[]

The byte array to write.

Exceptions

buffer is null.

The builder is not writable; it has been linked with another one.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

WriteBytes(Byte, Int32)

Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs
Source:
BlobBuilder.cs

Writes a specified number of occurrences of a byte value to the builder.

public void WriteBytes(byte value, int byteCount);

Parameters

value
Byte
byteCount
Int32

The number of occurences of value to write.

Exceptions

byteCount is negative.

The builder is not writable, it has been linked with another one.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)