错误,我无法参加会员,无法使用类似方法 [英] error i am getting non invocable member cannot used like method

查看:86
本文介绍了错误,我无法参加会员,无法使用类似方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

添加数据集后,出现类似方法无法使用的不可写成员错误.
这是代码

 公共 dsRateclass RatingClasslookup(LookUpType类型)
{
  dsRateclass ret = ;
  尝试
  {
     var  dataAccess =  LookUpDataAccess();
    ret = dataAccess. RatingClasslookup (类型);
  }
  捕获(异常)
  {
    //  TODO:未完成异常处理
    投掷;
  }
  返回 ret;
} 

解决方案

这意味着dataAccess对象的"RatingClasslookup"是属性,而不是函数.


After adding a dataset, I get the error non invocable member cannot used like method.
here is the code

public dsRateclass RatingClasslookup(LookUpType type)
{
  dsRateclass ret = null;
  try
  {
    var dataAccess = new LookUpDataAccess();
    ret = dataAccess.RatingClasslookup(type);
  }
  catch (Exception)
  {
    //TODO: Exception handling outstanding
    throw;
  }
  return ret;
}

解决方案

That means that "RatingClasslookup" of your dataAccess object is a Property, not a Function.


这篇关于错误,我无法参加会员,无法使用类似方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆