title: I can't pass an array as a parameter to a function in C#
body: <p>I want to create a filtered array with LINQ inside the function I created and print it on the screen. I got some errors.</p>
  <pre><code>    static void Main(string[] args)
      {
          //created an integer array
          var values = new[] {2,9,5,0,3,7,1,4,8,5 };
  
          // display original values
          Console.WriteLine(&quot;Orijinal Dizi:&quot;);
          foreach (var element in values)
          {
              Console.WriteLine($&quot;{element}&quot;);
          }
  
          FilteredArray(values);
          
      }
      public void FilteredArray(int[] values)
      {
          var filtered =
              from value in values
              where value &gt; 4
              select value;
          Console.WriteLine(&quot;4ten büyükleri filtreleyen dizi&quot;);
          foreach (var item in filtered)
          {
              Console.WriteLine($&quot;{item}&quot;);
          }
      }
  </code></pre>
  <p>&quot;FilteredArray (values);&quot; is underlined in red.
  Error CS0120: An object reference is required for the non-static field, method, or property 'Program.FilteredArray(int[])'</p>