Class ByteExtensions
Class ByteExtensions.
Inheritance
System.Object
ByteExtensions
Namespace: ISynergy.Framework.Core.Extensions
Assembly: ISynergy.Framework.Core.dll
Syntax
public static class ByteExtensions : object
Methods
View SourceToMemoryStream(Byte[])
Converts the byte array2 stream.
Declaration
public static MemoryStream ToMemoryStream(this byte[] _self)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | _self | The self. |
Returns
| Type | Description |
|---|---|
| MemoryStream | MemoryStream. |
ToStruct<T>(Byte[], Int32)
Deserializes (converts) a byte array to a given structure type.
Declaration
public static T ToStruct<T>(this byte[] rawData, int position = 0)
where T : struct
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | rawData | The byte array containing the serialized object. |
| System.Int32 | position | The starting position in the rawData array where the object is located. |
Returns
| Type | Description |
|---|---|
| T | The object stored in the byte array. |
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
This is a potentiality unsafe operation.