What is better solution to passing an uknown parameter problem?
<p>My problem is like this:</p>

<p>In <code>ASP</code> <code>DetailsView</code> component we have three different EventArgs for different DB operations:
<code>DetailsViewInsertedEventArgs</code>, <code>DetailsViewDeletedEventArgs</code>, <code>DetailsViewUpdatedEventArgs</code>.</p>

<p>All above EventArgs have common properites, I am interested in two of them: <code>Exception</code> and <code>ExceptionHandled</code>. Unfortunately those two properties are not existant in the common ancestor for those event args.</p>

<p>I would like to create a method like this:</p>

<pre><code>public void DoSomething(ref CommonAncestorForDVArgs args)
{

    if (args.Exception != null)
    {
        //do something with an exception
        args.ExceptionHandled = true;
    }
}
</code></pre>

<p>Of course this is not possible due to the fact that I've described earlier.
Solution which I came up with is this:</p>

<pre><code>public void DoSomething(Exception e, bool ExceptionHandled)
{

    if (e.Exception != null)
    {
        //do something with an exception
        ExceptionHandled = true;
    }
}
</code></pre>

<p>But I am wonder if there is something better?</p>
