// C# Extension Method
// Doc: https://csharp-extension.com/en/method/1002641/array-clearall
// @nuget: Z.ExtensionMethods
using System;
public class Program
{
public static void Main()
int[] numbers = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
for (int i = 0; i < 9; i++)
Console.Write("{0} ", numbers[i]);
}
Console.WriteLine("\n\nAfter ClearAll()\n");
// C# Extension Method: Array - ClearAll
numbers.ClearAll();