[Mono-bugs] [Bug 76792][Wis] New - System.Net.IPAddress(byte [] address) doesn't conform to .NET 2.0

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Nov 22 18:13:17 EST 2005


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 awaddell at fnfr.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76792

--- shadow/76792	2005-11-22 18:13:17.000000000 -0500
+++ shadow/76792.tmp.10353	2005-11-22 18:13:17.000000000 -0500
@@ -0,0 +1,72 @@
+Bug#: 76792
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: XP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: awaddell at fnfr.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: System.Net.IPAddress(byte [] address) doesn't conform to .NET 2.0
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. 
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace IPAddress
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {   //192.202.112.37
+            byte[] bytes = new byte[4] { 192, 202, 112, 37 };
+            System.Net.IPAddress ip = new System.Net.IPAddress(bytes);
+
+            Console.WriteLine(ip.ToString());
+
+        }
+    }
+}
+
+2. "C:\Program Files\Mono-1.1.10\bin\gmcs" /noconfig /nowarn:1691,67,169  
+/warn:4 /define:DEBUG;TRACE /define:MONO;HEADLESS;FIXME 
+/reference:System;System.Data;System.Xml /out:mono\Debug\IPAddress.exe   
+/target:exe Program.cs Properties\AssemblyInfo.cs
+
+3. 
+
+Actual Results:
+C:\Mono\IPAddress\mono\Debug>mono IPAddress.exe
+
+Unhandled Exception: System.ArgumentException: address
+in <0x0009c> System.Net.IPAddress:.ctor (System.Byte[] address, Int64 scopeId)
+in <0x00011> System.Net.IPAddress:.ctor (System.Byte[] address)
+in <0x0008a> IPAddress.Program:Main (System.String[] args)
+
+C:\Mono\IPAddress\mono\Debug>
+
+Expected Results:
+(result when run on .NET 2.0)
+192.202.112.37
+
+
+How often does this happen? 
+
+
+Additional Information:
+I looked briefly at the code and it's expecting a 16-byte array, but the MS
+documentation says that a 4-byte on is OK as well.


More information about the mono-bugs mailing list