title: Is there a name for this anti-pattern/code smell?
body: <p>Let me start by saying that I do not advocate this approach, but I saw it recently and I was wondering if there was a name for it I could use to point the guilty party to.  So here goes.</p>
  
  <p>Now you have a method, and you want to return a value.  You <em>also</em> want to return an error code.  Of course, exceptions are a much better choice, but for whatever reason you want an error code instead.  Remember, I'm playing devil's advocate here.  So you create a generic class, like this:</p>
  
  <pre><code>class FunctionResult&lt;T&gt;
  {
      public T payload;
      public int result;
  }
  </code></pre>
  
  <p>And then declare your functions like this:</p>
  
  <pre><code>FunctionResult&lt;string&gt; MyFunction()
  {
      FunctionResult&lt;string&gt; result;
      //...
  
      return result;
  }
  </code></pre>
  
  <p>One variation on this pattern is to use an enum for the error code instead of a string.  Now, back to my question:  is there a name for this, and if so what is it?</p>