title: System.Array does not contain a definition for 'Any' - C#
body: <p>Using Visual Basic // C#</p>
  
  <p>I'm trying to search through my stored arrays for a match to the user input. 
  For example, the user has stored the data for a USB, and now wishes to bring that information back up. </p>
  
  <p>FULL CODE BELOW</p>
  
  <p>I'm already using IndexOf to find the array index, but now i want to search that index for a match to the user's input. 
  This line of code: </p>
  
  <pre><code>if (ProductNameArray.Any(usersearch.Contains))
  </code></pre>
  
  <p>has come up with the error that </p>
  
  <blockquote>
    <p>System.Array does not contain a definition for 'Any'</p>
  </blockquote>
  
  <p>but it has worked in other code for me. </p>
  
  <p>I cannot seem to figure this out, any help is appreciated.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Text;
  using System.Threading.Tasks;
  using System.Linq;
  
  namespace Prac_Test3
  {
  
  
  class Program
  {
       // Constants
          const int SIZE_OF_PRODUCT_CODE = 4;
          const float CATEGORY_A_MARKUP = 10.0F;
          const float CATEGORY_C_MARKUP = 33.3F;
          const float CATEGORY_P_MARKUP = 15.0F;
          const int ARRAY_SIZE = 100;
  
  
      static void DisplayMenu()
      {
          Console.Clear();
          Console.WriteLine("--------------&gt; Menu &lt;------------");
          Console.WriteLine("1. Add a product                (a)");
          Console.WriteLine("2. Find a product               (f)");
          Console.WriteLine("3. Enter the quantity in stock  (q)");
          Console.WriteLine("4. Delete a product             (d)");
          Console.WriteLine("5. Calculate and display values (v)");
          Console.WriteLine("6. Exit                         (x)");
          Console.Write("\r\nEnter your selection: ");
      }
      static void AddProduct( string[] ProductNameArray, string[] ProductCodeArray, float[] WholesalePriceArray, ref int NextAvaliablePosition)
      {
          string ProductName = "";
          string ProductCode = "";
          string ProductCategory = "";
  
          float WholesalePricePerItem = 0.0F;
  
          bool ParseResult = false;
          bool ErrorFlag = false;
  
          string UserResponse = ""; 
  
          do
          {
              ErrorFlag = false;
              Console.Write("Product Name                : ");
              ProductName = Console.ReadLine();
              if (ProductName == "")
              {
                  Console.ForegroundColor = ConsoleColor.Red;
                  Console.WriteLine("Product Name must not be left blank.");
                  Console.ForegroundColor = ConsoleColor.Gray;
                  ErrorFlag = true;
              }
          } while (ErrorFlag);
  
          do
          {
              ErrorFlag = false;
              Console.Write("Product Code                : ");
              ProductCode = Console.ReadLine();
              if (ProductCode == "")
              {
                  Console.ForegroundColor = ConsoleColor.Red;
                  Console.WriteLine("Product Name must not be left blank.");
                  Console.ForegroundColor = ConsoleColor.Gray;
                  ErrorFlag = true;
              }
              else if (ProductCode.Length != SIZE_OF_PRODUCT_CODE)
              {
                  Console.ForegroundColor = ConsoleColor.Red;
                  Console.WriteLine("Product Code must be exactly four characters.");
                  Console.ForegroundColor = ConsoleColor.Gray;
                  ErrorFlag = true;
              }
              else
              {
                  ProductCategory = ProductCode.Substring(0, 1);
                  ProductCategory = ProductCategory.ToUpper();
                  if (ProductCategory != "A" &amp;&amp; ProductCategory != "C" &amp;&amp; ProductCategory != "P")
                  {
                      Console.ForegroundColor = ConsoleColor.Red;
                      Console.WriteLine("Product Code must start with A, C or P.");
                      Console.ForegroundColor = ConsoleColor.Gray;
                      ErrorFlag = true;
                  }
                  else if (!(Char.IsDigit(ProductCode[1])) &amp;&amp; !(Char.IsDigit(ProductCode[2])) &amp;&amp; !(Char.IsDigit(ProductCode[3])))
                  {
                      Console.ForegroundColor = ConsoleColor.Red;
                      Console.WriteLine("Product Code  must be A, C or P followed by three digits.");
                      Console.ForegroundColor = ConsoleColor.Gray;
                      ErrorFlag = true;
                  }
              }
          } while (ErrorFlag);
  
          do
          {
              ErrorFlag = false;
              Console.Write("Wholesale price per item ($): ");
              UserResponse = Console.ReadLine();
              ParseResult = float.TryParse(UserResponse, out WholesalePricePerItem);
              if (ParseResult == false)
              {
                  Console.ForegroundColor = ConsoleColor.Red;
                  Console.WriteLine("Not a valid number.");
                  Console.ForegroundColor = ConsoleColor.Gray;
                  ErrorFlag = true;
              }
              else if (WholesalePricePerItem &lt;= 0)
              {
                  Console.ForegroundColor = ConsoleColor.Red;
                  Console.WriteLine("Wholesale price must be a number greater than 0.");
                  Console.ForegroundColor = ConsoleColor.Gray;
                  ErrorFlag = true;
              }
          } while (ErrorFlag);
      }
      static void FindProduct(Array ProductNameArray)
      {
  
          int search = -1;
          string usersearch;
  
          usersearch = Console.ReadLine();
          search = Array.IndexOf(ProductNameArray, usersearch);
  
          if (search &gt;=0)
          {
              if (ProductNameArray.Any(usersearch.Contains))
              {
                  Console.WriteLine(" details blah blah");
              }
          }
          else if (search &lt;0)
          {
              Console.WriteLine("No record exists.");
          }    
  </code></pre>