[Mono-bugs] [Bug 710537] New: Enum.ToString gives incorrect result for some ulong based enums

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 4 19:16:13 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=710537

https://bugzilla.novell.com/show_bug.cgi?id=710537#c0


           Summary: Enum.ToString gives incorrect result for some ulong
                    based enums
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: joe at mistachkin.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.19)
Gecko/20110707 Firefox/3.6.19 ( .NET CLR 3.5.30729; .NET4.0E)


using System;

namespace ConsoleApplication1
{
    class Program
    {
        [Flags()]
        public enum MyEnumType : ulong
        {
            None = 0x0,
            Reserved = 0x8000000000000000
        }

        static void Main(string[] args)
        {
            MyEnumType value = MyEnumType.None;

            Console.WriteLine("{0} {1}",
                MyEnumType.None, value.ToString());
        }
    }
}


Reproducible: Always

Steps to Reproduce:
1. Compile and run the above C# code in .NET and Mono.
2. Observe that the results differ in .NET and Mono.

Actual Results:  
0 0


Expected Results:  
None None

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list