.net有没有类型下面的东西!
Dictionary<string, string,string,int,c1...> myDic = new Dictionary<string, string,string,int,c1...>();mydic.Add("aaa","bbb","ccc",5 new c1());如果没有的话要怎么构造啊!我用DataTable 循环添加 DataColumn
在循环添加DataRow感觉太复杂了!
Dictionary<string, string,string,int,c1...> myDic = new Dictionary<string, string,string,int,c1...>();mydic.Add("aaa","bbb","ccc",5 new c1());如果没有的话要怎么构造啊!我用DataTable 循环添加 DataColumn
在循环添加DataRow感觉太复杂了!
Dictionary <string, string,string,int,c1...> 是不定的
using System;
class Test
{
static void F(params object[] a)
{
Console.WriteLine("F(object[])");
}
static void F()
{
Console.WriteLine("F()");
}
static void F(object a0, object a1)
{
Console.WriteLine("F(object,object)");
}
static void Main()
{
F();
F(1);
F(1, 2);
F(1, 2, 3);
F(1, 2, 3, 4);
}
}
产生输出
F();
F(object[]);
F(object,object);
F(object[]);
F(object[]);
不知道说清了没有!
{
public int X
public int Y
}class B
{
public int X
public int Y
}
{
public string string1{get;set;}
public string string2{get;set;}
public int int1{get;set;}
}使用:
TestEntity test = new TestEntity();
test.string1="abc";
test.string2="def";
test.int1=0;
Dictionary <TestEntity> myDic = new Dictionary <TestEntity>();
myDic.Add(test);