title: C# app config database variables
body: <p>Ok I am kind of having some issue here. I was wondering what would work for my app config in my case. This is my code:</p>
  
  <pre><code>name = Path.GetFileNameWithoutExtension(filepath);
  extension = Path.GetExtension(e.FullPath);
  size = e.Name.Length;
  strSelectCmd = "INSERT INTO" + tablemysql + " ("+column1+","+column2+","+column3+","+column4+") VALUES('" + name + "','" + size + "',now(),'" + extension + "')";
  </code></pre>
  
  <p>Now I want the value of the variables: <code>name</code> <code>size</code> and <code>extension</code> to be adjustable. I was thinking of some ways to do this.
  Like putting this in the app config:</p>
  
  <pre><code>&lt;add key="value1" value="e.Name.Length"/&gt;
  </code></pre>
  
  <p>This probably wont work.</p>
  
  <p>What would I have to do if I want for example <code>size</code> to be adjustable. So when someone uses a different kind of column in the database(like they change <code>size</code> in their database to <code>user</code> , they can change the name/value of the so called: <code>size</code> as well?</p>
  
  <p>There might be a very simple solution to this, if so, I'm sorry.</p>