[Mono-bugs] [Bug 64230][Cos] New - Type.Namespace returns empty string instead of null
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 26 Aug 2004 19:05:59 -0400 (EDT)
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 priewasser@gmx.at.
http://bugzilla.ximian.com/show_bug.cgi?id=64230
--- shadow/64230 2004-08-26 19:05:59.000000000 -0400
+++ shadow/64230.tmp.28606 2004-08-26 19:05:59.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 64230
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Cosmetic
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: priewasser@gmx.at
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Type.Namespace returns empty string instead of null
+
+Description of Problem:
+The property Type.Namespace returns an empty string if no namespace is
+defined for a type, .Net returns null in this case.
+(I don't know which solution is better, the .Net or the mono, but the
+property should return the same value in both environments)
+
+Steps to reproduce the problem:
+Run this code:
+
+public class NameSp{
+ public static void Main(){
+ System.Type myType = System.Type.GetType("NameSp");
+ System.Console.WriteLine("myType.Namespace==null : "+(myType.
+Namespace==null));
+ System.Console.WriteLine("myType.Namespace==\"\" : "+(myType.
+Namespace==""));
+ }
+}
+
+
+Actual Results:
+myType.Namespace==null : False
+myType.Namespace=="" : True
+
+Expected Results:
+myType.Namespace==null : True
+myType.Namespace=="" : False
+
+How often does this happen?
+Always