可以和XML文件一样读取,或者使用
ConfigurationManager类来读取,see:    NameValueCollection appSettings =
         ConfigurationManager.AppSettings;
    
    // Get the collection enumerator.
    IEnumerator appSettingsEnum =
        appSettings.Keys.GetEnumerator();    // Loop through the collection and
    // display the appSettings key, value pairs.
    int i = 0;
    Console.WriteLine("App settings.");
    while (appSettingsEnum.MoveNext())
    {
        string key = appSettings.Keys[i];
        Console.WriteLine("Name: {0} Value: {1}",
        key, appSettings[key]);
        i += 1;
    }

解决方案 »

  1.   

    能不能说的在清楚些,怎么建立配置文件,配置文件里面有许多数字,怎么才能把每个数字和label的属性对应起来?
      

  2.   

    你在项目中添加设置文件,编写设置变量,变量范围有应用程序级别和用户级别,具体看这里,
    在 C# 中使用设置
    http://www.microsoft.com/china/msdn/library/langtool/vcsharp/SettingsCSRL.mspx?mfr=true
      

  3.   

    在配置文件中添加结点来设置那些颜色
    然后在程序里用ConfigurationManager对象来读取你设置的对应的结点里的值就可以了