标题:public static tt(int a)函数被调用
只看楼主
tsyj
Rank: 1
等 级:新手上路
帖 子:73
专家分:0
注 册:2006-3-21
 问题点数:0 回复次数:2 
public static tt(int a)函数被调用

我建了这个函数:
public static int tt(int a)
{

SqlConnection con=new SqlConnection("server=.;database=news;uid=sa;pwd=;");
SqlCommand cmd1=new SqlCommand(" select sum(vtsum) as aa from vta",con);
con.Open();
SqlDataReader sdr1=cmd1.ExecuteReader();
int a=Convert.ToInt32(sdr1["aa"].ToString());

return a;
}
我在PAGE__LOAD这样调用
this.tt(int a)
结果报错说我这个类,接口或方法没有返回类型,或者说重载tt不知道是怎么回事,

请指教一下...>>>>>>>>>

[此贴子已经被作者于2006-6-2 11:57:19编辑过]

搜索更多相关主题的帖子: int public static 函数 
2006-06-02 11:52
islet
Rank: 12Rank: 12Rank: 12
等 级:贵宾
威 望:89
帖 子:6548
专家分:0
注 册:2005-1-28
得分:0 
有返回值

static x=tt(int a)
2006-06-02 11:58
water123456
Rank: 5Rank: 5
等 级:贵宾
威 望:15
帖 子:3208
专家分:5
注 册:2006-2-21
得分:0 
支持楼上的.

让我们风风火火的过一生,别平平淡淡过一年。
2006-06-02 13:00



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-69233-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.830789 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved