I am trying to translate a Java program to C#. In the Java program there is a line Arrays.fill(used, false);
. When googled it, there is Array.Fill<>() in C#. But I am getting an error saying Array does not contain definition for Fill(). Does anybody know how to fix this?
My project is using .NET Framework 4.8.1. I am wondering why I cannot use Array.Fill() function documented in MSDN in my installation of Visual Studio.
My code is using the namespaces 'System', 'System.Collections.Generic', and 'System.Text'.
I have googled it and found one solution as adding 'System.Runtime.dll'. But I cannot find the file in 'ReferenceAssemblies' folder. I have downloaded and installed the .NET Framework from the website directly as well as tried repairing Visual Studio.