I need to implement this:
static class MyStaticClass
{
public const TimeSpan theTime = new TimeSpan(13, 0, 0);
public static bool IsTooLate(DateTime
From this link:
Constants must be a value type (sbyte, byte, short, ushort, int, uint, long, ulong, char, float, double, decimal, or bool), an enumeration, a string literal, or a reference to null.
If you want to create an object, it must be done so as static readonly
:
static class MyStaticClass
{
public static readonly TimeSpan theTime = new TimeSpan(13, 0, 0);
public static bool IsTooLate(DateTime dt)
{
return dt.TimeOfDay >= theTime;
}
}