clear all array elements 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);
MyList.Clear();
using System;
Array.Clear(arrayToClear, 0, arrayToClear.Length);