When using classes in certain namespaces of .NET you need to include the using statement at the top of you code.
If you fail to do so the compiler won’t be able to find the class.
XmlDoc.Load(Path.GetDirectoryName(Assembly.GetAssembly(typeof(OCIForm)).CodeBase) + “SampleXMLFile.xml”);
Here the Path and Assembly classes will not be found because I haven’t included the System.IO and System.Reflection namespaces.
You can add them manually if you know by hard which namespace to use for this class. But if your memory fails you, you could simply right clich the classname and select Resolve > Using System.IO;
The using statement will be added automatically.
Visual studio will automatically search for the namespace. 😉