我有这样的代码。C#将颜色应用于字体
System.Drawing.Color col = System.Drawing.ColorTranslator.FromHtml("#101B83");
System.Drawing.Font nameFont = new System.Drawing.Font("Tahoma", 10);
System.Drawing.Font birthdayFont = new System.Drawing.Font("Tahoma", 6);
System.Drawing.SolidBrush drawBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);
nameFont.Color = col;
最后一行不起作用,因为无法找到.Color字段。为什么?
你有没有听说过'namespaces'? – Mike 2010-10-19 09:00:07