Bug 311069 (MONO23733) - Problem with arrays a method arguments
Summary: Problem with arrays a method arguments
Status: RESOLVED MOVED
Alias: MONO23733
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Enhancement
Target Milestone: ---
Assignee: Mono Bugs
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-22 18:02 UTC by Jonathan Stowe
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 17:56:35 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"