Getting C#: Duplicate case when there is no duplicate

2 posts, 0 answers
  1. Marshall Moorman
    Marshall Moorman avatar
    8 posts
    Member since:
    Sep 2007

    Posted 18 Nov 2009 Link to this post

    I am getting an error on Next60Days, Next90Days, Next6Months, Next9Months, and Next12Months.  I'm not sure why this is happening.

        [Flags]  
        public enum DateRangePeriods : long 
        {  
            None = 0,  
     
            Today = 0x0000000000000001,  
            Yesterday = 0x0000000000000002,  
            CurrentWeek = 0x0000000000000004,  
            MonthToDate = 0x0000000000000008,  
            YearToDate = 0x0000000000000010,  
            LastMonth = 0x0000000000000020,  
            ThisWeek = 0x0000000000000040,  
            NextWeek = 0x0000000000000080,  
            LastWeek = 0x0000000000000100,  
            WeekToDate = 0x0000000000000200,  
            LastPeriod = 0x0000000000000400,  
            ThisPeriod = 0x0000000000000800,  
            Last30 = 0x0000000000001000,  
            Last60 = 0x0000000000002000,  
            Last90 = 0x0000000000004000,  
            LastYear = 0x0000000000008000,  
            CurrentWeekToDate = 0x0000000000010000,  
     
            Manual = 0x0000000000080000,  
     
            Custom1 = 0x0000000001000000,  
            Custom2 = 0x0000000002000000,  
            Custom3 = 0x0000000004000000,  
            Custom4 = 0x0000000008000000,  
            Custom5 = 0x0000000010000000,  
            Custom6 = 0x0000000020000000,  
            Custom7 = 0x0000000040000000,  
     
            Default = Manual | Today | Yesterday | CurrentWeek | CurrentWeekToDate | MonthToDate | YearToDate | LastMonth |  
                  ThisWeek | LastWeek | NextWeek | WeekToDate | LastPeriod | ThisPeriod |  
                  Last30 | Last60 | Last90 | LastYear,  
     
            Next30Days = 0x0000000080000000,  
            Next60Days = 0x0000000100000000,  
            Next90Days = 0x0000000200000000,  
            Next6Months = 0x0000000400000000,  
            Next9Months = 0x0000000800000000,  
            Next12Months = 0x0000001000000000,  
     
            FutureDates = Manual | Next30Days | Next60Days | Next90Days | Next6Months | Next9Months | Next12Months,  
        };  
     

                switch (period)  
                {  
                    case DateRangePeriods.None: return 0;  
                    case DateRangePeriods.Today: return 1;  
                    case DateRangePeriods.Yesterday: return 2;  
                    case DateRangePeriods.CurrentWeek: return 3;  
                    case DateRangePeriods.MonthToDate: return 4;  
                    case DateRangePeriods.YearToDate: return 5;  
                    case DateRangePeriods.LastMonth: return 6;  
                    case DateRangePeriods.ThisWeek: return 7;  
                    case DateRangePeriods.NextWeek: return 8;  
                    case DateRangePeriods.LastWeek: return 9;  
                    case DateRangePeriods.WeekToDate: return 10;  
                    case DateRangePeriods.LastPeriod: return 11;  
                    case DateRangePeriods.ThisPeriod: return 12;  
                    case DateRangePeriods.Last30: return 13;  
                    case DateRangePeriods.Last60: return 14;  
                    case DateRangePeriods.Last90: return 15;  
                    case DateRangePeriods.LastYear: return 16;  
                    case DateRangePeriods.CurrentWeekToDate: return 17;  
                    case DateRangePeriods.Manual: return 18;  
                    case DateRangePeriods.Custom1: return 25;  
                    case DateRangePeriods.Custom2: return 26;  
                    case DateRangePeriods.Custom3: return 27;  
                    case DateRangePeriods.Custom4: return 28;  
                    case DateRangePeriods.Custom5: return 29;  
                    case DateRangePeriods.Custom6: return 30;  
                    case DateRangePeriods.Custom7: return 31;  
                    case DateRangePeriods.Next30Days: return 32;  
                    case DateRangePeriods.Next60Days: return 33;  
                    case DateRangePeriods.Next90Days: return 34;  
                    case DateRangePeriods.Next6Months: return 35;  
                    case DateRangePeriods.Next9Months: return 36;  
                    case DateRangePeriods.Next12Months: return 37;  
                    defaultreturn 17;  
                }  
     

  2. Kaloyan
    Admin
    Kaloyan avatar
    82 posts

    Posted 19 Nov 2009 Link to this post

    Hi Marshall,

    Thanks for reporting the issue.
    We tracked it down and it is in our product backlog.

    Kind regards,
    Kaloyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
Back to Top