Search results

  1. froodley

    Catch block question

    Apologies for not formatting. My point was that the second version works, obviously, because the second try-catch structure is catching the error thrown by the inner one. The first version doesn't work the same way; the error thrown by the se catch block is uncaught. It was my understanding...
  2. froodley

    Build/publish two copies at once

    Hi, all, I'm looking for a way to have my code build two copies of itself at once. The program has an "A" and a "B" configuration that need to be compiled as Prog-A.exe and Prog-B.exe every time the code is compiled. I can do this manually, but I assume there's some way to do it in code...
  3. froodley

    Enumerator failing...

    Ah. But I assume that still involves enumerating the list somewhere on the framework side? I'm more curious to know what's going on; the index method and your solution both work around the issue...
  4. froodley

    Catch block question

    I think I know the answer here... but... let's say you have a try catch block like this: try ... catch se as SpecialException ... if blah then throw new Exception("blah found") catch e as Exception if e.message = "blah found" then foo end try Why doesn't this work? if you nest it... try TRY...
  5. froodley

    = nothing

    Yeah, I see that now, sorry... I thought I had canceled that last post? Darn internet... But you can do x = Nothing comparisons for reference types as well, and it works as you'd expect as long as the type implements the = operator and just return object.equals(a,b)... eg, object.equals(x...
  6. froodley

    = nothing

    [post canceled ineffectively due to fingers]
  7. froodley

    = nothing

    Try this: You'll get 0, 0, fail. If you assign a value other than 0, you get ,eg, 7,7,7. Without the assignment (just x as new integer, then if x= nothing) you get fail.
  8. froodley

    Enumerator failing...

    Hi, all, I have a databound listbox. I was refreshing the binding, then using this code: For Each i As Object In this_lb.Items If CType(i, ClassA) = currentSelection Then this_lb.SelectedItem = i End If Next ...to...
  9. froodley

    = nothing

    Thanks, I do know to use IsNothing. I am just wonder what = Nothing does by comparison. :confused:
  10. froodley

    = nothing

    Hi, all, I'm just wondering what is actually happening when you do a comparison like "if myobject = nothing then..." in vb.net. I know it doesn't work, and use IsNothing, etc... i'm just curious what it's doing. why does it evaluate to true? if it's using the object.Equals method, that...
  11. froodley

    Why default to ByVal?

    Thanks :D Thanks for the feedback; it was helpful. I think I had gotten in the habit of using byref because I didn't want to incur overhead during iteration by having to make copies of everything. I realize it's just making copies of the reference for reference types, but doesn't this still...
  12. froodley

    Why default to ByVal?

    Hey, folks, Just kind of curious about something: why does VS (vb and C#) default params to pass-by-value? I almost never need or want to pass anything by value. Maybe this is some reflection on the way I code. I would never manipulate a value type param directly; i would just return the new...
  13. froodley

    Shortening DNS timeout for SOAP

    Thanks, I gave that a try... Unfortunately the Ping request takes the same amount of time to fail its DNS lookup. When it fails, it throws a PingException with an inner exception of type System.Net.Sockets.SocketException with this stack trace: at System.Net.Dns.GetAddrInfo(String name)...
  14. froodley

    Shortening DNS timeout for SOAP

    I tried the Timeout property; it only effects how long the application will wait for a response to an XML request. A DNS request is not effected. If I set the m_service.timeout property to 2000ms while I am online and can reach the service, the timeout for the XML request takes two seconds...
  15. froodley

    Shortening DNS timeout for SOAP

    Hi, all, I use a web service to access our internal databases. The problem I'm having is that a call to the service is part of my application startup, and when the computer is offline or the server is otherwise unreachable, the DNS call is taking much too long to timeout. I would like to set...
  16. froodley

    Delegate params not being mismatched

    Bump I really need some kind of answer for this, if anyone has anything to try...
  17. froodley

    Controls changing size for no reason

    *sigh* I tried to handle wndProc, but the resize is happening somewhere in between when the message is sent and the next time the listbox's resize event is raised. I think I'm going to give up and just disallow resizing the window so I can force it to stay one size by smashing it back into...
  18. froodley

    Controls changing size for no reason

    Nope... No menu or status strip. The listview is in a panel (the "main" area), and the listbox is not. Thanks, though... I'll think about what else might be resizing.
  19. froodley

    Controls changing size for no reason

    hmmm Thanks, I gave that a shot. I have slightly more detail: this happens most reliably if I minimize the window. The listbox resize event is called a bunch of times in a row; the listview resize is only called once or twice. The stack traces for the undesired resizes indicate it's nothing...
  20. froodley

    Controls changing size for no reason

    ahhh. didn't think of breaking there, great idea. hopefully that will make some sense of it.
Top Bottom