[Mono-bugs] [Bug 23733] New - Problem with arrays a method arguments
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
22 Apr 2002 15:02:13 -0000
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by gellyfish@gellyfish.com.
http://bugzilla.ximian.com/show_bug.cgi?id=23733
--- shadow/23733 Mon Apr 22 11:02:13 2002
+++ shadow/23733.tmp.23850 Mon Apr 22 11:02:13 2002
@@ -0,0 +1,38 @@
+Bug#: 23733
+Product: Mono/MCS
+Version: unspecified
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gellyfish@gellyfish.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Problem with arrays a method arguments
+
+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.