Think For One ... Second
What's wrong with this code? There are unnecessary lines. So? Why care about unnecessary lines? Because it shows that the programmer was not really thinking about what he was doing.
MyObject obj = someList.Find(delegate(MyObject test)
{
if (test.Id.Equals(packageId))
{
return true;
}
else
{
return false;
}
});