Return multiple values from a method
<p>Hi guys i'm having a problem regarding returning multiple values from a method. I'm using 'out' to return other value from a method, here the snippet:</p>

<pre><code>public DataTable ValidateUser(string username, string password, out int result)
{
    try
    {
        //Calls the Data Layer (Base Class)
        if (objDL != null)
        {
            int intRet = 0;
            sqlDT = objDL.ValidateUser(username, password, out intRet);
        }
    }
    catch (Exception ex)
    {
        ErrorHandler.Handle(ex);
        OnRaiseErrorOccuredEvent(this, new ErrorEventArgs(ex));
    }
    return sqlDT;
}
</code></pre>

<p>then when i compile having a error like this:</p>

<p>"The out parameter 'return' must be assigned to before control leaves the current method"</p>

<p>Anyone guys can help me solve this.</p>
