Beispiel #1
0
 /// <summary>
 /// Accepts an array of the given type, or creates one if necessary, copy the buffer data into it
 /// </summary>
 public static unsafe T[] ToArray <T>(this IBuffer buffer, T[] dest = null) where T : unmanaged
 => (T[])buffer.CopyBytes(dest ?? new T[buffer.NumBytes() / sizeof(T)]);