how to empty an array c#

100

c# initialize empty array -

datatype[] arr = new datatype[]{};
or
datatype[] arr = new datatype[0];
or
datatype[] array = {}
or
var a = Array.Empty<datatype>();

Comments

Submit
0 Comments