Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设我在 Form1 中声明了一个 oledDbAdapter1,在 Form2 中声明了另一个名称完全相同的。这会引起任何冲突吗?
否,完全限定的对象名称必须是唯一的。所以在你的情况下,你有:
MyApplication.Form1.oledDbAdapter1
和
MyApplication.Form2.oledDbAdapter1
其中 MyApplication 是应用程序或程序集的名称
所以这不会引起问题。但是你不能调用两个oledDbAdapter1对象Form1
oledDbAdapter1
Form1