title: Use exceptional char (minus) in property name of anonymous type
body: <h1>The problem</h1>
  
  <p>I am trying to declare an anonymous type with a property named <code>data-maxchars</code>.</p>
  
  <p>Because the minus is an operator it degrades (?) my desired property name into an operation and I get a compilation error: <code>Invalid anonymous type member declarator.</code></p>
  
  <p>I know I can escape reserved words using @, but I can't figure out if there is any way to escape the minus.</p>
  
  <pre><code>object attributes = (object)new { @class = "foo" } // OK
  </code></pre>
  
  <h1>The origin</h1>
  
  <p>The anonymous type is passed as an <code>object</code> argument to <a href="http://msdn.microsoft.com/en-us/library/dd505150.aspx" rel="noreferrer">TextAreaExtensions.TextArea</a>: <code>&lt;%= Html.TextArea(Model.Field.Id, val, rows, cols, attributes)%&gt;</code>. This generates an input with the delivered attributes.</p>
  
  <p>I want to use JS progressive enhancement to limit the number of chars the user can insert.<br>
  So I am using the <code>data-</code> prefix on my attribute: <a href="http://ejohn.org/blog/html-5-data-attributes/" rel="noreferrer">http://ejohn.org/blog/html-5-data-attributes/</a></p>
  
  <h1>Alternatives</h1>
  
  <ul>
  <li>While writing this I noticed there is an <a href="http://msdn.microsoft.com/en-us/library/dd470771.aspx" rel="noreferrer">overload</a> that takes an IDictionary instead of an object.</li>
  <li>I could write the input by hand.</li>
  <li>I could use a different prefix and ignore the standards. (Boo!)</li>
  </ul>
  
  <p>But if there is a way to use the funny property name, I'd like to learn it.</p>