Hi all, I've given a look at the source code of the UdpClient class... and the Dispose() method looks like this:
void Dispose (bool disposing) { if (disposed) return; disposed = true; if (disposing) { // release managed resources } // release unmanaged resources Socket s = socket; socket = null; if (s != null) s.Close (); } Well, now I've two questions: 1. Isn't Socket a managed resource? 2. What the advantage of assigning socket to the s local variable, and then call the Close() method on it? Please, understand me right! This is not a critic. I'm implementing something similar, and since I use to call Socket.Close() inside the "if (disposing) {}" block, I just want to know if I'm wrong. Thanks, Gius_. ---------------------------------------- Giuseppe Greco ::agamura:: phone: +41 (0)91 604 67 65 mobile: +41 (0)76 390 60 32 email: [EMAIL PROTECTED] web: www.agamura.com ---------------------------------------- _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list