'Global' not allowed in this context; identifier expected
The Global keyword is used in a statement where it is not allowed.
The Global
keyword allows you to access a namespace defined outside the namespace hierarchy in which your code is to be compiled. Global
starts the qualification path at the outermost namespace level of the .NET Framework class library.
Certain statements, such as Imports
and Namespace
, are independent of the namespace in which your code is to be compiled. They require a full qualification path, starting from the root-level namespace, such as System or Microsoft.VisualBasic. In such statements, the Global
keyword is superfluous and is not allowed.
Error ID: BC36001
To correct this error
- Remove the
Global
keyword from the statement. It is not needed.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for