Tigraine

Daniel Hoelbling-Inzko talks about programming

WPF Sample, badly done

Posted by Daniel Hölbling on June 12, 2009

While trying out some WPF, I ended up downloading this code sample on Drag&Drop that contained the following piece  of code:

if (e.Source == MyCanvas)
{
}
else
{
    _isDown = true;
    _startPoint = e.GetPosition(MyCanvas);
    _originalElement = e.Source as UIElement;
    MyCanvas.CaptureMouse();
    e.Handled = true;
}

Come on? I’ve seen 6 year olds that knew the use of != and ==.

Please Microsoft: Documentation is as important as shipping code. At least review what crap is getting put out there. It just looks bad to say the least.

Filed under net, programmierung
comments powered by Disqus

My Photography business

Projects

dynamic css for .NET

Archives

more