clear array c# code example
Example 1: c# clear list items
MyList.Clear();
Example 2: c# clear an array
using System;
Array.Clear(arrayToClear, 0, arrayToClear.Length);
Example 3: remove all array elements c#
Array.Clear(myArray, 0, myArray.Length);
Example 4: how to empty an array c#
Array.Clear(arr, 0, arr.Length);