ArraySegmentExtensions.ConvertAndCopy Method (ArraySegment<Byte>, UInt32, Int32, Int32)Couchbase .NET SDK 2.0
Takes a value, converts it from little-endian to big-endian and the copies it to the ArraySegment<T> at a given offset and length.

Namespace: Couchbase.Utils
Assembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
public static void ConvertAndCopy(
	this ArraySegment<byte> arraySegment,
	uint value,
	int offset,
	int count
)

Parameters

arraySegment
Type: System.ArraySegment<Byte>
The ArraySegment<T> to copy the value to.
value
Type: System.UInt32
An UInt32 to copy to the ArraySegment<T>.
offset
Type: System.Int32
The offset to write the value to within the ArraySegment<T>
count
Type: System.Int32
The length of the write - e.g. 4 for a int, 8 for a long.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ArraySegment<Byte>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also