当前上下文中不存在名称“lblbtcaount” [英] The name 'lblbtcaount' does not exist in the current context

查看:130
本文介绍了当前上下文中不存在名称“lblbtcaount”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误显示 -

当前上下文中不存在名称'lblbtcaount'



我尝试了什么:



if(ds2.Tables [0] .Rows.Count> 0)

{

userid = Convert.ToString(ds2.Tables [0] .Rows [0] [userid]);

lblbtcaount.Text = Convert.ToString(ds2.Tables [0] .Rows [0] [bitcoinval]); //此行错误显示



imgpath = Convert.ToString(http://www.g.com/+ ds2.Tables [0] .Rows [0] [macadd]);

}

Error is show-
The name 'lblbtcaount' does not exist in the current context

What I have tried:

if (ds2.Tables[0].Rows.Count > 0)
{
userid = Convert.ToString(ds2.Tables[0].Rows[0]["userid"]);
lblbtcaount.Text = Convert.ToString(ds2.Tables[0].Rows[0]["bitcoinval"]); // This line error show

imgpath = Convert.ToString("http://www.g.com/" + ds2.Tables[0].Rows[0]["macadd"]);
}

推荐答案

错误非常明确:

The error is pretty explicit:
The name 'lblbtcaount' does not exist in the current context

它意味着它所说的:当前类或方法中没有任何内容称为 lblbtcaount - 要么你有错误的类,错误的拼写,要么错误的情况:C#区分大小写,所以 lblbtcaount 不是sa我是 lblbtCaount

但我猜它是拼写:你的意思是 lblbtcount 而不是?

It means what it says: there is nothing in the current class or method called lblbtcaount - either you have the wrong class, the wrong spelling, or the wrong case: C# is case sensitive, so lblbtcaount is not the same as lblbtCaount.
But I'd guess that it's the spelling: did you mean lblbtcount instead?


这篇关于当前上下文中不存在名称“lblbtcaount”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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