Example #1
0
        static int DateComparerStr(BaseGameLog left, BaseGameLog right)
        {
            /*if (!((typeof(refloatValue) == PlayedGame || typeof(refloatValue) == WinningGame) &&
                 (typeof(right) == PlayedGame || typeof(right) == WinningGame)))
                return 1;*/

            return right.GameDate.CompareTo(left.GameDate);
        }
Example #2
0
        static int DateCompare(BaseGameLog left, BaseGameLog right)
        {
            DateTime l, r;

            try
            {
                if (!DateTime.TryParse(left.GameDate, out l)) return 0;
                if (!DateTime.TryParse(right.GameDate, out r)) return 0;

                return r.CompareTo(l);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Trolled Hard Son");
                Debug.WriteLine(ex.Message);
                Debug.WriteLine(ex.StackTrace);
            }

            return DateTime.Now.CompareTo(DateTime.Now); // lol... ;-)
        }