Class ByteExtension
Extensions for byte.
Inheritance
System.Object
ByteExtension
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: StoneCo.Framework.Extension
Assembly: cs.temp.dll.dll
Syntax
public static class ByteExtension
Methods
ToObject<T>(Byte[])
Get object from an byte array.
Declaration
public static T ToObject<T>(this byte[] value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value | Byte array to convert in object. |
Returns
Type | Description |
---|---|
T | Object or null. |
Type Parameters
Name | Description |
---|---|
T | The type of the object to get. |
Examples
Bar class used in this example.
public class Bar
{
public string GetObjectString()
{
var foo = "Stone Co";
var byteArray = foo.ToByteArray();
return byteArray.ToObject<string>();
}
}