[Mono-list] C sharp syntax [OT?]

Gaurav Vaish Gaurav.Vaish@iitk.ac.in
Fri, 3 May 2002 07:04:30 +0530


----- Original Message ----- 
From: "James Ots" <me@jamesots.com>
To: <mono-list@ximian.com>
Sent: Thursday, May 02, 2002 02:27
Subject: [Mono-list] C sharp syntax [OT?]


> 
> while the following is not:
> 
> IPEndPoint ipend = new IPEndPoint( host.AddressList[0], 23 );

    Change it to the following:

    IPEndPoint ipend = new IPEndPoint( (host.AddressList)[0], 23);

Your statement reads the following:

    IPEndPoint ipend = new IPEndPoint( host.(AddressList[0]), 23);

    which is invalid.

HIH

Cheers,
Gaurav Vaish
http://mastergaurav.virtualave.net/iitk
http://calendar.yahoo.com/mastergaurav
-----------------------------------------


> 
> Why is this?
> 
> In IPHostEntry it appears the second format is used, but I get an error
> message when I do it:
> 
> ./Sock.cs(26) error CS0118: Expression denotes a `property access' where
> a `variable' was expected
> Error: Compilation failed
> 
> -- 
> Cheers
> James Ots
> 
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list