C# 总是提醒我方法无效 Invalid method name: 'GetInterval' 求高手指点下~到底应该怎么写~~加Q讲也行~
刚毕业森么都不会~~谁能教我怎么写或者怎么改~~我好着急下面是代码
public int GetInterval()
{
send_GetInterval();
return recv_GetInterval();
}
public void send_GetInterval()
{
oprot_.WriteMessageBegin(new TMessage("GetInterval", TMessageType.Call, seqid_));
GetInterval_args args = new GetInterval_args();
args.Write(oprot_);
oprot_.WriteMessageEnd();
oprot_.Transport.Flush();
}
public int recv_GetInterval()
{
TMessage msg = iprot_.ReadMessageBegin();
if (msg.Type == TMessageType.Exception)
{
TApplicationException x = TApplicationException.Read(iprot_);
iprot_.ReadMessageEnd();
throw x;
}
GetInterval_result result = new GetInterval_result();
result.Read(iprot_);
iprot_.ReadMessageEnd();
if (result.__isset.success) {
return result.Success;
}
throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "GetInterval failed: unknown result");
}
刚毕业森么都不会~~谁能教我怎么写或者怎么改~~我好着急下面是代码
public int GetInterval()
{
send_GetInterval();
return recv_GetInterval();
}
public void send_GetInterval()
{
oprot_.WriteMessageBegin(new TMessage("GetInterval", TMessageType.Call, seqid_));
GetInterval_args args = new GetInterval_args();
args.Write(oprot_);
oprot_.WriteMessageEnd();
oprot_.Transport.Flush();
}
public int recv_GetInterval()
{
TMessage msg = iprot_.ReadMessageBegin();
if (msg.Type == TMessageType.Exception)
{
TApplicationException x = TApplicationException.Read(iprot_);
iprot_.ReadMessageEnd();
throw x;
}
GetInterval_result result = new GetInterval_result();
result.Read(iprot_);
iprot_.ReadMessageEnd();
if (result.__isset.success) {
return result.Success;
}
throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "GetInterval failed: unknown result");
}
解决方案 »
- winform 怎样实现从程序openFileDialog打开的目录中拖动文件到程序listview中
- 这个函数在C#中怎么声明
- C#中文件的同步异步读写有什么不同?
- 有点不能理解,请高手帮忙!
- 求助:ADO.NET如何有条件地执行UPDATE或INSERT语句
- 登录界面,登陆之后就显示“列名 'S_Password' 无效”。求助!
- C#做一个winform应用,获取天猫单品页的商品描述内容。因商品描述部分是动态加载的,所以无法获取加载后的内容。
- 如何得到前一个网页的URL
- 在form中画曲线图,有没有什么好的建议
- 这个资源地址改怎么写?
- 遇到一个奇怪的事,谁能说说?
- 文字转图形数据再转换为二进制数据
这两个方法重名了
要么使用方法重载,
要么重命名一个方法
或者在类里检查下GetInterval看有没有重名的情况
是int的~~
也没有重名情况
namespace 命名空间
{
class 类名
{
你的代码
}
}我估计你的代码没有写到类中