Namespace Compile Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am having a problem with namespace resolution. Example is below:

Namespace MyNamespace
Public Class MyClass
public x as System.String
end class
end namespace

I get the following compile error:
Type 'System.String' is not defined.

Using VS 2003. There is a reference to system.dll in the project. Nothing
else unusual that I know of. Why won't it resolve System.String?
If I make it just String it works, but I am using some generated code so
this is not easy to change everywhere.

Please help!!!
Thanks, Brian.
 
The main issue I see, from the code sample, is MyClass, which is an illegal
class name. Are you command line compiling?

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
Thanks for the reply......I got the mystery solved.
One of the generated classes in the namespace was named System. Obviously
this caused havoc resolving any type that was System.*

It hit me on the way home tonight!

Brian
 
Back
Top