title: How to achieve const-correctness in C#?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/114149/const-correctness-in-c-sharp">&ldquo;const correctness&rdquo; in C#</a>  </p>
  </blockquote>
  
  
  
  <p>I have programmed C++ for many years but am fairly new to C#. While learning C# I found that the use of the <a href="http://en.csharp-online.net/const,_static_and_readonly" rel="nofollow noreferrer">const</a> keyword is much more limited than in C++. AFAIK, there is, <a href="http://andymcm.com/csharpfaq.htm#6.8" rel="nofollow noreferrer">for example</a>, no way to declare arguments to a function const. I feel uncomfortable with the idea that I may make inadvertent changes to my function arguments (which may be complex data structures) that I can only detect by testing. </p>
  
  <p>How do you deal with this situation?</p>