Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IsDisposed and Invoke
Message
From
20/06/2012 14:13:58
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
IsDisposed and Invoke
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01546464
Message ID:
01546464
Views:
57
I have this method in a project:
        ' Wrapper for Invoke method that does not throw an exception after the object has been
        ' disposed while the calling method was running in a background thread
        Private Sub SafeInvoke(ByVal method As [Delegate], ByVal args() As Object)

            Try
                If Not IsDisposed Then Invoke(method, args)
            Catch x As ObjectDisposedException
            End Try

        End Sub
This works as is. If I move this code into another project, IsDisposed and Invoke are highlighted stating that they are not declared. Both projects contains the three references to the component that needs this. So, I am trying to understand why it works on one and not on the other one.

Anyone knows what this does and how to resolves this issue?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform