title: How can i set a variable in File.WriteAllLines file name?
body: <p>so i have this problem with File.WriteAllLines. I would like to know if it's possible to set a string variable to fill the city name automaticly? And if yes, how can i do that? Here's my code.</p>
  
  <pre><code>void GiveALLFreeMuseumsToFileTest(MuseumsContainer museums)
  {
      string[] lines = new string[museums.Count];
      for (int i = 0; i &lt; museums.Count; i++)
      {
          lines[i] = lines[i] + "Museum Name: " + museums.GetMuseum(i).Name;
          lines[i] = lines[i] + "; Museum Type: " + museums.GetMuseum(i).Type;
          if (museums.GetMuseum(i).Days.Count() &lt;= 2 &amp;&amp; (museums.GetMuseum(i).Days.Contains("VI") || museums.GetMuseum(i).Days.Contains("VII")))
          {
              lines[i] = lines[i] + "; Open only at WEEKENDS";
          }
          if (museums.GetMuseum(i).City == "NewYork")
          {
              File.WriteAllLines("Nemokami_NewYork.csv", lines);
          }
          if (museums.GetMuseum(i).City == "Washington")
          {
              File.WriteAllLines("Nemokami_Washington.csv", lines);
          }
          if (museums.GetMuseum(i).City == "Chicago")
          {
              File.WriteAllLines("Nemokami_Chicago.csv", lines);
          }
          if (museums.GetMuseum(i).City == "Charlotte")
          {
              File.WriteAllLines("Nemokami_Charlotte.csv", lines);
          }
          if (museums.GetMuseum(i).City == "Miami")
          {
              File.WriteAllLines("Nemokami_Miami.csv", lines);
          }
      }
  }
  </code></pre>