可以啊,我试了!下面的代码是对的!
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;
}
不过我劝楼主还是使用参数数组比较好!!

解决方案 »

  1.   

    老大,你传递那么多参数要干什么,也许你会说,那时我的一个表里面的字段,那你为什么不针对你的表,创建一个类呢?专门用来描述这个表,比如说对每一个字段都提供属性
    这个问题我没有遇到过,因为没有尝试过:)
    实在是不行,你就把你这些个参数放到arraylist中传递过去
      

  2.   

    sing System;
    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();
            }
        
        }
    }
      

  3.   

    HapTears(玻璃*杯) 你在加两个参数试试
      

  4.   

    TO:
    brightheroes(闭关) 
    请问您知道参数限制的原因吗?
      

  5.   

    看看
    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;
    }
      

  6.   

    我也受不了,你先看我的using System;
    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;
    }
    }
      

  7.   

    还是别写了!多累呀!32个参数写也要写半天呢,不如喝杯咖啡。根据你上面写的定义一个数组不就完了吗
    string[] array = new string[32]public int a(string[] array)
    {
    }
    不是更好吗!?