在Visual Studio中使用Findbyid方法
使用C#中的FindbyId方法有一些问题。
当书面写出时,该程序将无法识别Findby
方法。代码的其他任何部分都没有产生错误。
Database3DataSet.MemlistRow customerRow = Database3DataSet.MemlistDataTable.FindByID(Int32.Parse(textBox2.Text));
示例似乎显示了等式的后半部分,
Database3DataSet.Memlist.FindByID(Int32.Parse(textBox2.Text));
例如不是作为数据表。但这似乎不是一个选择。 Solution Explorer似乎还表明数据词等于表。所以也许这是Visual Studio 2022中的一个变化?
此外,我不能声明任何内容,因为这似乎并未被识别为一种方法。
我尝试使用选择方法,但也无法使它起作用。此帮助似乎还显示了名为MemList Input的表,而不是MemlistDataTaTat。所以我想知道这是否是同样的问题。
实际上,我可以通过不同的,更简单的编码将Findbyid识别为一种方法,但无法获得更多的零件,我已经失去了使我到达那里的简单代码。
Having some issues using FindByID method in C#.
The program will not recognize the FindBy
method when written out as below. No other parts of the code produce an error.
Database3DataSet.MemlistRow customerRow = Database3DataSet.MemlistDataTable.FindByID(Int32.Parse(textBox2.Text));
Examples seem to show the second half of the equation as
Database3DataSet.Memlist.FindByID(Int32.Parse(textBox2.Text));
e.g. not as a datatable. But this does not seem to be an option. Also Solution Explorer seems to show that DataTable is equal to table. So maybe this is a change present in Visual Studio 2022?
Furthermore I cannot declare anything a Dim as this does not seem to be recognized as a method.
I tried using the Select method but I cannot get this to work either. The help for this also seem to show the table called Memlist input and just that, not MemlistDataTable. so I wonder if this is the same problem.
I could actually get FindByID to be recognized as a method through different, simpler coding, but could not get further parts to work and I have lost the simple piece of code that got me there.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我必须使用该代码上方的数据添加一个实例
var mc = new database3dataset.memlistDataTable();
I had to add an instance of the DataTable above this code using
var mc = new Database3DataSet.MemlistDataTable();