title: C# Check array for string
body: <p>I'm Year 1 student so I don't know much about c# yet....<br>
  Is there any way to check if user inputed array contains a certain string?<br> If so I need to add a value to another array.</p>
  
  <p>Here is the code I have so far:</p>
  
  <pre><code>var lookup = new Dictionary&lt;string, string&gt;           
  {
      ["H1"] = "100",
      ["O1"] = "56",
      ["H2"] = "88",
      ["O2"] = "46",
      ["H3"] = "77",
      ["O3"] = "37",
      ["H4"] = "66",
      ["O4"] = "28",
      ["H5"] = "56",
      ["O5"] = "20",
      ["H6"] = "46",
      ["O6"] = "12",
      ["H7"] = "37",
      ["O7"] = "0",
      ["H8"] = "0",
      ["O8"] = "0",
  };     
  
  //input grades/subject
  int s;
  int g;
  int p;
  
  string[] grades = new string[6];
  string[] subjects = new string[6];
  string[] points = new string[6];
  
  // Accepting value from user 
  for (s = 0, g = 0,p=0; s &lt;= 5; s++, g++,p++)
  {
      Console.Write("\nEnter your subject:\t");
      subjects[s] = Convert.ToString(Console.ReadLine());
      subjects[s] = subjects[s].ToUpperInvariant();
  
  
      Console.Write("\nEnter your grade:\t");
      grades[g] = Convert.ToString(Console.ReadLine());
      grades[g] = grades[g].ToUpperInvariant();
      if (!lookup.TryGetValue(grades[g], out points[p]))
          Console.WriteLine("Wrong Grade Format!");
  
  }
  
  Console.Clear();
  for (s = 0, g = 0,p=0; s &lt;= 5; s++, g++,p++)
  {
      Console.WriteLine("{0,15}:{1}:{2}", subjects[s], grades[g],points[p]);//output
  }
  </code></pre>
  
  <p>I need to check array that is created by user and if there is Math then +25points has to be added</p>