Bugzilla – Bug 311069
Problem with arrays a method arguments
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by gellyfish@gellyfish.com 2002-04-22 11:02:12 MST ---- Array accesses in circumstances similar to: IPHostEntry iphe; for (int i=0; i < args.Length; i++){ iphe = Dns.GetHostByName (args [i]); Console.WriteLine (iphe.HostName); for (int k=0; k < iphe.Aliases.Length; k++) Console.WriteLine ("\t" + iphe.Aliases [k]); for (int k=0; k < iphe.AddressList.Length; k++) Console.WriteLine ("\t" + iphe.AddressList [k].ToString ()); } Give rise to an error: ./dnstest.cs(14) error CS0118: Expression denotes a `property access' where a `variable' was expected Where the line indicated is 'Console.WriteLine("\t" + iphe.Aliase[k])' invocation. ---- Additional Comments From gellyfish@gellyfish.com 2002-04-22 11:27:47 MST ---- More specifically this appears to be to do with indexed properties. ---- Additional Comments From lupus@ximian.com 2002-04-22 12:31:09 MST ---- I think this is the duplicate of an existing bug where an array that is not a l-value is not considered indexable (while it is). *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO23540 *** Unknown operating system other. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"