Boxing error with generic function
问题 If I comment out my static class this compiles fine. However i'd like to have the static class working so I can use the first commented out line in main. My error is error CS0314: The type 'T' cannot be used as type parameter 'T' in the generic type or method 'DateTest.Range'. There is no boxing conversion or type parameter conversion from 'T' to 'System.IComparable'. My source is using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading