Click or drag to resize

ExtensionsGetBytes Method (Byte, UInt32)

Gets a specified length of bytes.

If the specified length length is longer than the source array the source array will be returned instead.

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static byte[] GetBytes(
	this byte[] target,
	uint length
)

Parameters

target
Type: SystemByte
The Array that contains the data to copy.
length
Type: SystemUInt32
A 32-bit integer that represents the number of elements to copy.

Return Value

Type: Byte
Returns an array of bytes

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . 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).
Exceptions
ExceptionCondition
ArgumentNullExceptiontarget is null
ArgumentExceptionlength is 0
See Also