I was just a bit confused about something sorry. If you have two classes, Ribbon1 and ThisAddIN below. How can I call Example()?
- All are in the same namespace..
public partial class Ribbon1
{
private void button1_Click_1(object sender, RibbonControlEventArgs e)
{
//Call Example() from ThisAddIn Class
Example();
}
}
public partial class ThisAddIn
{
public void Example()
{
//Do x,y,z etc
}
}
Obviously I've tried running something like:
ThisAddIn test = new ThisAddIn();
test.Example();
I think i'm missing something basic as I don't really work with multiple classes. Mybe this would work?! I just want to know the most appropriate way to do this really..
public partial class Ribbon1 : ThisAddIn
{
private void button1_Click_1(object sender, RibbonControlEventArgs e)
{
//Call Example() from ThisAddIn Class
ThisAddIn.Example();
}
}
public partial class ThisAddIn
{
public void Example()
{
//Do x,y,z etc
}
}
Thank you