title: How to convert foreach loop to lambda expression
body: <p>I have this piece of code.</p>
  
  <p>I want to convert this into lambda expression. How to reach this</p>
  
  <pre><code>string[] MyString= ConfigurationManager.AppSettings["MyStringData"].Split(',');
  
  foreach (string res in MyString)
  {
      if (res != "MyName")
      {
          btnshowname.Visible = false;
      }
      else if (res == "MyName")
      {
          btnshowname.Visible = true;
          break;
      }
  }
  </code></pre>
  
  <p>Tell me the lambda expression please and how to achieve this</p>