[Mono-dev] UdpClient Client Property bug

Robert Jordan robertj at gmx.net
Wed Aug 23 17:43:04 EDT 2006


Matt Durgavich wrote:
> Hi all,  I've been doing some socket development, and was surprised to see
> the following not compile.
> 
>  using System.Net.Sockets;
> 
>  public class TestClass {
>    public static void Main() {
>        UdpClient cli= new UdpClient();
>        Socket sock= cli.Client; <----- compiler error
>     }
>  }
> 
> 
> UdpClient's property Client is marked as protected, whereas I think it
> should be public according to MSDN. Advise?
> Cheers,

It's public in .NET 2.0. Either don't use it or compile
with gmcs, which targets the 2.0 profile.

Robert





More information about the Mono-devel-list mailing list