静态变量可以在方法中初始化吗?以下代码有效吗?谢谢!
internal static class Common
{
internal static int TimeOut;
internal static string Name;
internal static void Initialize()
{
TimeOut = Config.Read("timeout");
Name = Config.Read("Name");
}
}