TargetInvocationException?

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-05-08T03:44:48Z Indexed on 2010/05/08 3:48 UTC
Read the original article Hit count: 219

Filed under:
|
|

Why would these lines of code cause that exception

    private Dispatcher dispatcher = null;

    public DownloadManager(Dispatcher dispatcher = null)
    {
        this.dispatcher = dispatcher ?? Dispatcher.CurrentDispatcher;
    }

When the DownloadManager is instantiated in the XAML like

<Window.DataContext>
    <c:DownloadManager />
</Window.DataContext>

?

© Stack Overflow or respective owner

Related posts about c#

Related posts about wpf