2

for some reason, maybe due to an inadvertent change I am getting a number of errors on compilation that say:: Type System.Object, and System.EventArgs are not defined...PLEASE NOTE that for some incoming parameters i don't see the intellisense complain (i.e. no compilation error) --- the 2 screenshots display 2 sections of the same page...

I have the following Imports directive at the top which does not apparently help:

Imports System.Object
Imports System.EventArgs

I have the following Imports directive at the top which does not apparently help:

Imports System.Object
Imports System.EventArgs
Utpal Mattoo
  • 890
  • 3
  • 17
  • 41

1 Answers1

2

Find the System class or module that you declared in your code. Right-clicking "System" in your source code and picking "Go to Definition" ought to take you to it. Rename it to something else.

Be careful with this in VB.NET, it tends to add lots of identifiers to the global namespace. Avoid modules, use classes instead. And strongly favor using the Namespace keyword.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536