可以啊,我试了!下面的代码是对的!
private void b()
{
a("1","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","33");
}
public void a(string a1,string a2,string a3,string a4,string a5,string a6,string a7,string a8,string a9,string a10,string a11,string a12,string a13,string a14,string a15,string a16,string a17,string a18,string a19,string a20,string a21,string a22,string a23,string a24,string a25,string a26,string a27,string a28,string a29,string a30,string a31,string a32,string a33)
{
string xx=a33;
string a=xx;
}
不过我劝楼主还是使用参数数组比较好!!
private void b()
{
a("1","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","2","33");
}
public void a(string a1,string a2,string a3,string a4,string a5,string a6,string a7,string a8,string a9,string a10,string a11,string a12,string a13,string a14,string a15,string a16,string a17,string a18,string a19,string a20,string a21,string a22,string a23,string a24,string a25,string a26,string a27,string a28,string a29,string a30,string a31,string a32,string a33)
{
string xx=a33;
string a=xx;
}
不过我劝楼主还是使用参数数组比较好!!
这个问题我没有遇到过,因为没有尝试过:)
实在是不行,你就把你这些个参数放到arraylist中传递过去
using System.Data;
namespace com.uncnet.wl.uncData
{
[Serializable]
public class s_balance_termData
{
public s_balance_termData()
{
}
private const string DV = "@#$%";
private string dataStatus;
private string id = DV; //PK
private string name = DV;
private string description = DV;
private string status = DV; public string DataStatus
{
get
{
return dataStatus;
}
set
{
dataStatus=value;
}
}
public string Id
{
get
{
if(this.id == DV)
{
return "";
}
else
{
return id;
}
}
set
{
id=value;
}
}
public string Name
{
get
{
if(this.name == DV)
{
return "";
}
else
{
return name;
}
}
set
{
name=value;
}
}
public string Description
{
get
{
if(this.description == DV)
{
return "";
}
else
{
return description;
}
}
set
{
description=value;
}
}
public string Status
{
get
{
if(this.status == DV)
{
return "";
}
else
{
return status;
}
}
set
{
status=value;
}
} public string recordAdd()
{
string strSql;
strSql= "insert into S_BALANCE_TERM( ";
if(this.id != DV)
{
strSql += "id,";
}
if(this.name != DV)
{
strSql += "name,";
}
if(this.description != DV)
{
strSql += "description,";
}
if(this.status != DV)
{
strSql += "status,";
}
if(strSql.EndsWith(","))
{
strSql = strSql.Substring(0,strSql.Length -1) + ")";
}
strSql += "values(";
if(this.id != DV)
{
if(this.id != "")
{
strSql += this.Id + ",";
}
else
{
strSql += "null,";
}
}
if(this.name != DV)
{
if(this.name != "")
{
strSql += "'"+this.Name + "',";
}
else
{
strSql += "null,";
}
}
if(this.description != DV)
{
if(this.description != "")
{
strSql += "'"+this.Description + "',";
}
else
{
strSql += "null,";
}
}
if(this.status != DV)
{
if(this.status != "")
{
strSql += this.Status + ",";
}
else
{
strSql += "null,";
}
}
if(strSql.EndsWith(","))
{
strSql = strSql.Substring(0,strSql.Length -1) + ")";
}
return strSql;
}
public string recordUpdate()
{
string strSql;
strSql= "update S_BALANCE_TERM set ";
if(this.name != DV)
{
if(this.name != "")
{
strSql += "name='" + this.name +"',";
}
else
{
strSql += "name= null,";
}
}
if(this.description != DV)
{
if(this.description != "")
{
strSql += "description='" + this.description +"',";
}
else
{
strSql += "description= null,";
}
}
if(this.status != DV)
{
if(this.status != "")
{
strSql += "status=" + this.status + ",";
}
else
{
strSql += "status= null,";
}
}
if(strSql.EndsWith(","))
{
strSql = strSql.Substring(0,strSql.Length -1);
}
if(strSql.Trim().EndsWith("t"))
{
return null;
}
strSql += " where " +
"id="+this.Id+"";
return strSql;
}
public string recordDel()
{
string strSql;
strSql= "delete from S_BALANCE_TERM where "+
"id='"+this.Id+"'";
return strSql;
}
public void getData(DataRow varRow)
{
this.Id = varRow["id"].ToString();
this.Name = varRow["name"].ToString();
this.Description = varRow["description"].ToString();
this.Status = varRow["status"].ToString();
}
}
}
brightheroes(闭关)
请问您知道参数限制的原因吗?
private void ImageButton2_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
if(EmployeeID.Enabled==true)
{
if(!KW_DA_ArchivesInfoData.ArchivesInfoPK(EmployeeID.Text.Trim()))
{
aaaa("12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12");
}
}
PIGridBind();
} private int aaaa(string fgg0,string fgg1,string fgg2,string fgg3,string fgg4,string fgg5,string fgg6,string fgg7,string fgg8,string fgg9,string fgg10,string fgg11,string fgg12,string fgg13,string fgg14,string fgg15,string fgg16,string fgg17,string fgg18,string fgg19,string fgg20,string fgg21,string fgg22,string fgg23,string fgg24,string fgg25,string fgg26,string fgg27,string fgg28,string fgg29,string fgg30,string fgg31,string fgg32,string fgg33,string fgg34,string fgg35,string fgg36)
{
int good=4;
return good;
}
class test
{
public static void Main()
{
int total;
total = a(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
Console.WriteLine(total);
}
public static int a(int t1,int t2,int t3,int t4,int t5,int t6,int t7,int t8,int t9,int t10,int t11,int t12,int t13,int t14,int t15,int t16,int t17,int t18,int t19,int t20,int t21,int t22,int t23,int t24,int t25,int t26,int t27,int t28,int t29,int t30,int t31,int t32,int t33,int t34,int t35,int t36,int t37,int t38,int t39,int t40)
{
int tmp;
return tmp = t1 + t2 + t3 + t4 + t5 + t6 + t7 + t8 + t9 + t10 + t11 + t12 + t13+ t14 + t15 + t16 + t17 + t18 + t19 + t20 + t21 + t22 + t23 + t24 + t25 + t26 + t27 + t28 + t29 + t30 + t31 + t32 + t33 + t34 + t35 + t36 + t37 + t38 + t39 + t40;
}
}
string[] array = new string[32]public int a(string[] array)
{
}
不是更好吗!?