我失去了表值的价值我明白了 [英] I get lost value of table value i got it

查看:67
本文介绍了我失去了表值的价值我明白了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的表字段名称名称"仅听到10个值,我获得了第一行值,如何获得这10个值.

my table field name "name" hear 10 values only i got first row of value how to get the 10 values.

string name1 = Convert.ToString(lst1[0]);

推荐答案

这没有任何意义:
This does not make any sense:
for (int m = 0; m < 10; m++)
                    {

                        string value = lbl.Text;
                        lst1.Add(value);

                    }


您只是循环10次,一次又一次地添加相同的值.有一些逻辑上的缺陷.由于您尚未共享所尝试的内容,因此很难说出来,但是肯定需要正确地实现以上代码段(可能使用从DB检索到的数据).
使用Visual Studio DEBUGGER并确保实现能够执行您想要的操作.


You are just looping 10 times adding same value again and again. There is some logical flaw. Since you have not shared what were you trying, it is difficult to tell but surely you need to implement the above snippet properly probably using data retrieved from DB.
Use Visual Studio DEBUGGER and make sure the implementation does what you are trying to.


这篇关于我失去了表值的价值我明白了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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