I’m using Visual C# 2008 Express and I’m creating an Add=in button that will display the name of the map document when clicked. The title property is available in the Document class using the interface IDocument. I’m using the ESRI.ArcGIS.Framework reference, but the following code:
gives me the following error: ‘the type or namespace name ‘DocumentClass’ could not be found’. I'm confused because this works with the MxDocumentClass and the ArcMapUI reference. Any help would be greatly appreciated.
Code:
protected override void OnClick()
{
IDocument doc = new DocumentClass();
ArcMap.Application.CurrentTool = null;
}