Method SizeOf
SizeOf(Byte[])
Returns the size in bytes of the byte[] object.
Declaration
public static long SizeOf(byte[] arr)
Parameters
Type |
Name |
Description |
System.Byte[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(SByte[])
Returns the size in bytes of the sbyte[] object.
Declaration
public static long SizeOf(sbyte[] arr)
Parameters
Type |
Name |
Description |
System.SByte[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(Boolean[])
Returns the size in bytes of the bool[] object.
Declaration
public static long SizeOf(bool[] arr)
Parameters
Type |
Name |
Description |
System.Boolean[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(Char[])
Returns the size in bytes of the char[] object.
Declaration
public static long SizeOf(char[] arr)
Parameters
Type |
Name |
Description |
System.Char[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(Int16[])
Returns the size in bytes of the short[] object.
Declaration
public static long SizeOf(short[] arr)
Parameters
Type |
Name |
Description |
System.Int16[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(Int32[])
Returns the size in bytes of the int[] object.
Declaration
public static long SizeOf(int[] arr)
Parameters
Type |
Name |
Description |
System.Int32[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(Single[])
Returns the size in bytes of the float[] object.
Declaration
public static long SizeOf(float[] arr)
Parameters
Type |
Name |
Description |
System.Single[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(Int64[])
Returns the size in bytes of the long[] object.
Declaration
public static long SizeOf(long[] arr)
Parameters
Type |
Name |
Description |
System.Int64[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(Double[])
Returns the size in bytes of the double[] object.
Declaration
public static long SizeOf(double[] arr)
Parameters
Type |
Name |
Description |
System.Double[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(UInt64[])
Returns the size in bytes of the ulong[] object.
Declaration
public static long SizeOf(ulong[] arr)
Parameters
Type |
Name |
Description |
System.UInt64[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(UInt32[])
Returns the size in bytes of the uint[] object.
Declaration
public static long SizeOf(uint[] arr)
Parameters
Type |
Name |
Description |
System.UInt32[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(UInt16[])
Returns the size in bytes of the ushort[] object.
Declaration
public static long SizeOf(ushort[] arr)
Parameters
Type |
Name |
Description |
System.UInt16[] |
arr |
|
Returns
Type |
Description |
System.Int64 |
|
SizeOf(Object)
Estimates the RAM usage by the given object. It will
walk the object tree and sum up all referenced objects.
Resource Usage: this method internally uses a set of
every object seen during traversals so it does allocate memory
(it isn't side-effect free). After the method exits, this memory
should be GCed.
Declaration
public static long SizeOf(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Int64 |
|