title: Alternative to "out" and "ref"
body: <p>I have multiple functions from which i output last errors.</p>
  
  <p>In c++, you can just pass a nullptr default initializer in the function prototype and it compiles fine, but in C# it doesn't seem to allow you to initialize <code>out</code> or <code>ref</code> parameters in case you do not need to use them.</p>
  
  <p>There are of course plenty of answers to my question, such as just storing them within the class and such, but for my purposes, passing it from the function itself would be the prefered way.</p>
  
  <p>So is there any way to have an <code>out</code> or <code>ref</code>-like parameter to a function and be able to initialize it to default values in case the user does not want to use it?</p>
  
  <p>Perhaps you can use the c++ syntax somehow? (the pointers and byrefs, maybe using unsafe code?)</p>