예제 #1
0
 /// <summary>
 /// Replaces the values of data in memory with random values. The GC handle will be freed.
 /// </summary>
 /// <remarks>Will only work on <see cref="GCHandleType.Pinned"/></remarks>
 /// <param name="target"></param>
 /// <param name="targetLength">The length of the data</param>
 public static void FillWithRandomValues(this GCHandle target, int targetLength) => target.FillWithRandomValues(targetLength, true);