title: Can I create a constant expression for use in attribute parameter?
body: <p>As anyone answering this already knows, parameters of attributes require constant expressions. Optional parameters (for anything, not just attributes) also require constant expressions for their default values.</p>
  
  <p>The (albeit minor) inconvenience I'm having is with <code>RegularExpressionAttribute</code>'s pattern parameter. I have dozens of properties in my data-model that use this attribute (found in System.ComponentModel.DataAnnotations), and whenever I make a change to the validation pattern, I have to go back and make that change <em>everryyywherrreee</em> . . . it's really quite annoying.</p>
  
  <h2>My question . . .</h2>
  
  <p>Is there a .net structure that can be declared, recognized as a constant expression, and then be usable where constant expressions are normally required?</p>
  
  <p>It would be great if I could just declare a <code>RegexPatternForNameProperty = "^[a-zA-Z0-9,.# ]{1,150}$"</code> property somewhere, then just change that one value as needed.</p>