【发布时间】:2016-02-18 13:06:32
【问题描述】:
我在我的解决方案中添加了一个数据源,它生成了一个数据集和表适配器。我无法从我的主表单中引用这些表适配器。
例子:
try
{
user_count = (int)this.UsersTableAdapter.count_users();
} catch (NullReferenceException e)
{
MessageBox.Show(e.Message);
}
错误:
Main 不包含 UsersTableAdapter 的定义
我在 DataSet.Designer.cs 中找到了这些适配器的定义 如何导入或引用这些定义以在我的 Main.cs 中使用?
【问题讨论】:
标签: c# tableadapter strongly-typed-dataset visual-studio-2015