c# initialize new empty array code example
Example 1: c# initialize empty array
datatype[] arr = new datatype[]{};
or
datatype[] arr = new datatype[0];
or
datatype[] array = {}
or
var a = Array.Empty<datatype>();
Example 2: how to empty an array c#
Array.Clear(arr, 0, arr.Length);