在Class.cs类里 我想写个string[] 数组 在运行时主程序 初始化它 然后作为全局变量可以调用它 请教 呵呵
解决方案 »
- 高手指教:幽灵一样的错误:尝试读取或写入受保护的内存。这通常指示其他内存已损坏。(about:WebBrowser)
- C#怎么反射调用dll之中的事件
- Stream与byte[]的相互转换问题
- 请问C# webbrowser的一个比较好的扩展控件的名字
- 新手刚接触lucene.net2.0
- 用ExecuteNonQuery()怎样返回存储过程参数
- 请问如何在DBGrid中的模板列中,引出自定义用户控件里面的自定义事件!!!(在线给分)
- 十万火急,救命!如何将treeview当中的节点信息存入数据库。
- 能不能用Switch..case来case(选择不等式)的项,它能不能比较不等式呢
- 请教大神们,datagridview怎样动态添加数据类型的列?
- 在dataGridView中怎么保存后来新增的多条数据
- c#循环插值效率问题
{
public static string[] a;
static void Main()
{
a = new string[] { "abc", "123", "其他", };
}
}
{
public static string[] a;
}class Program
{
static void Main()
{
Class1.a = 从数据库中读入;
}
}
class Class1
{
public int[] myArray = new int[100];
public int this[int index]
{
get
{
if (index < 0 || index >= 100)
return 0;
else
return myArray[index];
}
set
{
if (!(index < 0 || index >= 100))
myArray[index] = value;
}
}
}主要是受这个影响 现在还没明白 上面的来龙去脉 看谁能解释下 9楼的是对的 class Class1
{
public static string[] a =null;
}