.NET Components for Mobility

Peter Foot

Microsoft Device Application Development MVP

.NETCF 3.5 Breaking Changes

I came across this useful list of breaking changes in the .NETCF 3.5 runtime and thought I'd blog it here before I lose the URL:-

http://msdn.microsoft.com/en-us/netframework/bb986636.aspx

Published Mar 13 2009, 10:12 AM by PeterFoot
Filed under:

Comments

 

alanjmcf said:

Re "System.Net.Sockets.TcpClient.Dispose

   Closing TcpClient closes the underlying network stream"

Oh tell me they've fixed the other problem...  In NETCF when the TcpClient was finalized the Socket/NetworkStream was closed too!  That means the following patterns isn't usable:

   class Wrapper

   {

       Stream conn;

       public void Connect(string hostname)

       {

           //

           TcpClient cli = new TcpClient(hostname);

           conn = cli.GetStream();

       }

       ... ...

   }

Because at some later point the TcpClient will be GC and that will close the connection!   And why use that pattern?  Because in NETCFv1 there's no Socket.Connect(string) method. :-(

Oh dear, there's no bug report at connect.microsoft.com.  Woops, should have created one... :-(

Alan

March 16, 2009 11:20 AM
 

alanjmcf said:

Typo: Should have said "There's no Socket.Connect(string,int) in NETCF (any version)."

March 16, 2009 11:26 AM

About PeterFoot

Peter Foot is co-author of the Microsoft Mobile Development Handbook published by Microsoft Press. Peter has been awarded the Microsoft Most Valuable Professional (MVP) accolade since 2003 for his involvement in the Microsoft .NET Compact Framework developer community. Alongside an active presence in several online forums and communities, attendance at developer conferences and involvement in shared-source projects, Peter has also written a number of technical articles and maintains an active technical blog.
Copyright © 2001-2010 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.