chpmould 发表于 2010-11-20 19:44:00

类中返回静态变量

初学C#,请教各位老师一个很菜的问题:
例如:
//定义的类
public class test
    {
      public static double X;
       ... ...
}
//定义的窗体test
    {
      textBox4.Text = X;   
       ... ...
}

雪山飞狐_lzh 发表于 2010-11-20 20:49:00

textBox4.Text = test.X.ToString();

chpmould 发表于 2010-11-20 23:41:00



谢谢狐哥!我测试可以了。。。
页: [1]
查看完整版本: 类中返回静态变量