title: VB.net storing variable names in sql for use in process launch arguments
body: <p>I'm building a diagnostic tool with a script and application launcher, and I'm doing this in .net 3.5. We may be able to use .net 4 soon but nothing above that because of windows xp!</p>
  
  <p>The menu's are being populated from a sql table, linking to these applications.</p>
  
  <p>Some of these applications are scripts and require arguments to run, I don't want people to have to type anything in, and the application will store these argument attributes such as user and hostname as part of the diagnostic tool. If the arguments required for this script are stored on sql as a string, how might I convert that to the variable value?</p>
  
  <p>for example:</p>
  
  <pre><code>Public strHostname As String = "pc1" 'global variable set by computer
  
  strArguments = "/c /v:strHostname /wait" 'pulled from sql
  </code></pre>
  
  <p>when building my arguments string for process.start, i want to switch strHostname from strArguments with "pc1" from my public variable.</p>
  
  <p>Obviously this would be best done with a standard string find and replace, but I have literally hundreds of variables and do not wish to construct a case statement that big.</p>
  
  <p>Is there any other way I could take the string "strHostname" and use that to find the value of the public strHostname?</p>