标题: 关于color缺少using指令或程序集引用 [打印本页] 作者: 高宜 时间: 2012-6-4 15:34 标题: 关于color缺少using指令或程序集引用 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//using System.Drawing;
namespace 静态构造函数
{
class Program
{
static void Main(string[] args)
{
UserPreference user = new UserPreference();
Console.ReadKey();
}
}
public class UserPreference
{
public static readonly Color BackColor;
static UserPreference()
{
DataTime now = DataTime.Now;
if (now.DayOfWeek == DayOfWeek.Monday
|| now.DayOfWeek == DayOfWeek.Saturday)
BackColor = Color.Green;
else
BackColor = Color.Red;