From 4b92e747a46955a5b1a5118416f0543e38a9e9f6 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Mon, 18 Feb 2013 08:21:15 -0600 Subject: [PATCH] Add Arrays.Fill --- Antlr4.Runtime/Sharpen/Arrays.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Antlr4.Runtime/Sharpen/Arrays.cs b/Antlr4.Runtime/Sharpen/Arrays.cs index 62f6f188b..5043de74f 100644 --- a/Antlr4.Runtime/Sharpen/Arrays.cs +++ b/Antlr4.Runtime/Sharpen/Arrays.cs @@ -15,5 +15,11 @@ { return array; } + + public static void Fill(T[] array, T value) + { + for (int i = 0; i < array.Length; i++) + array[i] = value; + } } }