Hi All,
I am using C# for ArcObjects desktop. Kindly clarify me on the below to declarations
1. IApplicatin app = IMxDocument.doc as IApplication;
----
-------
throws an exception (NUllReferenceException) when i use
app.OpenDocument(filename)------ where filename is a string in the openFileDialog1
2. IApplication app = (IMxDocument.doc as IDocument).Parent
---
---
This does not throw an exception. My doubt is why does the first option throw an error while second option does not even though both IApplication & IDocument.Parent both refer to Application.
Thanks a lot in advance...!