BinaryDataExtensions ToBinaryData Method Delta Engine Documentation

Namespace: DeltaEngine.Core
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public static Object ToBinaryData(
	this byte[] data
)

Parameters

data
Type:  System Byte 

Return Value

Type: Object

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).
Remarks

Tests: DeltaEngine.Tests.Core.BinaryDataExtensionsTests
Examples

1 unit tests call DeltaEngine.Core.BinaryDataExtensions.ToBinaryData(System.Byte[])
[Test]
public void ObjectToBinaryData()
{
    string message = "This message cannot be resolved!";
    byte [] data = BinaryDataExtensions.ToByteArrayWithLengthHeader(message);
    Assert.AreEqual(data[0], 44);
}
See Also