Class ByteArrayExtensions
Extension methods for byte[]
arrays.
Inheritance
System.Object
ByteArrayExtensions
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.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GlitchedPolygons.ExtensionMethods
Assembly: GlitchedPolygons.ExtensionMethods.dll
Syntax
public static class ByteArrayExtensions
Methods
| Improve this Doc View SourceGetFileSizeString(Byte[])
Gets the byte[]
array's human readable file size string (e.g. "5 KB" or "20 MB").
Declaration
public static string GetFileSizeString(this byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | The bytes (for example a file whose size you want to retrieve in a human readable way). |
Returns
Type | Description |
---|---|
System.String | A human readable file size |
UTF8GetString(Byte[])
Returns Encoding.UTF8.GetString(byte[])
.
Declaration
public static string UTF8GetString(this byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | The |
Returns
Type | Description |
---|---|
System.String | Returns |