CA1800:DoNotCastUnnecessarily: false positive?!
CA1800 : Microsoft.Performance : 'sender', a parameter, is cast to type 'System.Web.UI.WebControls.ObjectDataSource' multiple times in method EditPage.ObjectDataSourceInserted(Object, ObjectDataSourceStatusEventArgs):Void. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction. ...
code:
protected virtual void ObjectDataSourceInserted(object sender, ObjectDataSourceStatusEventArgs e)
{
if (e.Exception == null)
{
ObjectDataSourceInsertedOk((ObjectDataSource) sender, e);
}
else
{
ObjectDataSourceInsertedError((ObjectDataSource) sender, e);
}
}
I consider this a false positive.

