namespace functions { class Program { static int maxval(int[] maximum) { int bigvalue = maximum[0]; for (int i = 0; i < maximum.Length; i++) { if (bigvalue < maximum[i]) { bigvalue = maximum[i]; } } return bigvalue; } static void Main(string[] args) { int[] myarray = { 10, 10, 8, 20, 93, 78 }; int bigvalue = maxval(myarray); Console.WriteLine("The largest value is "+ bigvalue); Console.ReadKey(); } } } HTML: When I remove the word static on line 5 before the function declaration and replace it with a acessor public or i just remove static completely I get an error an object reference is required for the non static field required something something what does static keyword do in C# why is it so important here do i need it in every function declaration