c#工程中全局变量的定义方法

1.建立一单独的公共类,在类中定义全局常量或变量,如下using System;namespace Globalspace{/// <summary>/// Global 的摘要说明。/// </summary>///public class global{#region "常量定义区"//数据库连接字符串public const string conString = "User ID=sa;Password=mypass;Initial Catalog=master;Data Source=127.0.0.1;Min Pool Size=
posted @ 2012-02-02 14:06  大佛张  阅读(21538)  评论(0编辑  收藏  举报