title: How to set dynamic value in my Attribute
body: <p>I would like to pass a dynamic variable as a parameter to my attribute. Here I want to use Environment.MachineName, see the code below:</p>
  
  <pre><code>public interface IMonitoringViewModelConfiguration : IConfigurationContainer
  {
      [ConfigurationKey("MonitoringService", Environment.MachineName)]
      string ConnectionString { get; }
  }
  </code></pre>
  
  <p>But I get this error:
  Error   1   An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type  Abc.ServiceBus.Monitoring.ViewModel </p>
  
  <p>Is there any workaround as clean as possible in order to pass my Environment.MachineName ?</p>
  
  <p>Thanks.</p>
  
  <p>John</p>
  
  <p>PS: I've found some articles which talk about this case but it have been written like 2-3 years ago. But today, does the clr which comes from .NET 4.0 gives some nice solution ?</p>