定义了zd,然后怎么在原来传值的基础上再加一个值!
string[] zd = {"Name"};
conInsAuto("Big", zd );然后将该值传到一个方法里:
public bool conInsAuto(string TableName , string[] ziduan)
{
//在这里怎么在原来传值的基础上再加一个值!
ziduan + = {"ID"};
...................
return true;
}
求高人帮忙解决!谢谢!
string[] zd = {"Name"};
conInsAuto("Big", zd );然后将该值传到一个方法里:
public bool conInsAuto(string TableName , string[] ziduan)
{
//在这里怎么在原来传值的基础上再加一个值!
ziduan + = {"ID"};
...................
return true;
}
求高人帮忙解决!谢谢!
解决方案 »
- AutoCompleteExtender自动提示功能,怎么弄不成呢??帮忙哦`
- 有没有朋友有精通ASP.NET 3.5网络应用系统开发里面的数据库?
- 错误页面。。。怎么制作?
- 在HtmlTable中默认为一行文本框,当单击按钮时,增加一行,HtmlTable显示为2行文本框! 不断单击不断增加,最好有删除功能! 如何实现?asp.net(C#)
- DateTime 如何格式化成yyyy/mm/dd形式日期,用DateTime.Now.ToString("yyyy/mm/dd")不对,请问如何实现?谢谢
- 我想覆盖System.Web.UI.WebControls.Label这个类,可不可以
- 求javascript 写法
- gridview中checkbox分页问题
- ObjectDataSource 中的Start Row Index 和Maximum Rows 问题
- 在ASP.NET中,请问如何实现页面不刷新或者是“半”刷新?
- 如何用另外的控件在后台代码中设置网页calendar控件的年月日值
- 简单问题!!能不能看出来是什么错误??!!
zd.Add("Big");
Zd.Add("ID");
然后在方法里边怎么加一个为"id"的值回AllenTing(我爱吃醋) ( :
G:\SQL\SQL.cs(248): “System.Array”并不包含对“Add”的定义
G:\SQL\SQL.cs(247): 不能在此范围内声明名为“ziduan”的局部变量,因为这样会使“ziduan”具有不同的含义,而它已经用于“父级或当前”范围以表示其他内容
G:\SQL\SQL.cs(247): 无法将类型“System.Collections.ArrayList”隐式转换为“string[]”
a.Add("name");
a.Add("ID");
hashtable.add(id,velue)健值是一对一对的
HashTabel hstb=new HashTabel()
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: 在此处添加代码以启动应用程序
//
System.Collections.ArrayList arr=new System.Collections.ArrayList();
add("aa",ref arr);
add("bb",ref arr);
for(int i=0;i<arr.Count;i++)Console.WriteLine(arr[i].ToString());
Console.ReadLine(); } public static void add(string s,ref System.Collections.ArrayList arr)
{
arr.Add(s);
}
}
}
{
//在这里怎么在原来传值的基础上再加一个值!
ArrayList al = new ArrayList();
int i;
for (i = 0 ; i < ziduan.GetLength();++i)
{
al.Add(ziduan[i]);
}
al.Add(TableName);
return al.ToArray(typeof(string));
}
string[] zd = {"Name"};
conInsAuto("Big", ref zd );public bool conInsAuto(string TableName , ref string[] ziduan)
{
string[] temp = new string[ziduan.length+1];
ziduan.CopyTo(temp, temp.Length);
temp[ziduan.length] = "ID";
ziduan= temp;
...................
return true;
}
string[] zd = {"Name"};
conInsAuto("Big", ref zd );public bool conInsAuto(string TableName , ref string[] ziduan)
{
string[] temp = new string[ziduan.length+1];
ziduan.CopyTo(temp, ziduan.Length);
temp[ziduan.length] = "ID";
ziduan= temp;
...................
return true;
}
//如果非要用string[], 可以这样:(但建议使用ArrayList等)
string[] zd = {"Name"};
conInsAuto("Big", ref zd );public bool conInsAuto(string TableName , ref string[] ziduan)
{
string[] temp = new string[ziduan.length+1];
ziduan.CopyTo(temp, 0);
temp[ziduan.length] = "ID";
ziduan= temp;
...................
return true;
}