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 で別の oledDbAdapter1 を宣言したとします。これにより、競合が発生しますか?
いいえ、完全修飾オブジェクト名は一意である必要があります。したがって、あなたの場合は次のとおりです。
MyApplication.Form1.oledDbAdapter1
と
MyApplication.Form2.oledDbAdapter1
MyApplication は、アプリケーションまたはアセンブリの名前です
したがって、これで問題が発生することはありません。oledDbAdapter1ただし、2 つのオブジェクトを呼び出すことはできませんForm1
oledDbAdapter1
Form1