W
William Ryan eMVP
I'm seeing something weird and I must just be overlooking something. I have
a connection and I open it(connection is named 'cn'). I close it in my
execution block but I have it wrapped in a Try/Catch/Finally and in finally
I check if the connectionState <> ConnectionState.Closed - if it's not then
I call .Close. However, even though it successfully closes and the debugger
tells me it's closed in the If Statement, it still runs to Close. This
isn't a big deal in that it doesn't cause any problems but I've verified
that the connection is closed and I'm wondering what's up with that?
Finally
Debug.Assert(cn.State = ConnectionState.Closed)
'The assertion doesn't fail indicating that it's in fact close
If cn.State <> ConnectionState.Closed Then cn.Close()
If I put my cursor here (On cn.State) it indicates closed as well, but it
always calls Close anyway. Any ideas?
End Try
--
W.G. Ryan, eMVP
Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
a connection and I open it(connection is named 'cn'). I close it in my
execution block but I have it wrapped in a Try/Catch/Finally and in finally
I check if the connectionState <> ConnectionState.Closed - if it's not then
I call .Close. However, even though it successfully closes and the debugger
tells me it's closed in the If Statement, it still runs to Close. This
isn't a big deal in that it doesn't cause any problems but I've verified
that the connection is closed and I'm wondering what's up with that?
Finally
Debug.Assert(cn.State = ConnectionState.Closed)
'The assertion doesn't fail indicating that it's in fact close
If cn.State <> ConnectionState.Closed Then cn.Close()
If I put my cursor here (On cn.State) it indicates closed as well, but it
always calls Close anyway. Any ideas?
End Try
--
W.G. Ryan, eMVP
Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups