在Visual Studio中使用Findbyid方法

发布于 2025-02-08 03:56:24 字数 708 浏览 1 评论 0原文

使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久隐师 2025-02-15 03:56:24

我必须使用该代码上方的数据添加一个实例
var mc = new database3dataset.memlistDataTable();

I had to add an instance of the DataTable above this code using
var mc = new Database3DataSet.MemlistDataTable();

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文