Is it possible to add a method to a class from another project?
I have a class:
namespace ProjectLibrary
{
public class ClassA
{
// some methods
}
}
I want to add a method to save my object in a file, but I don't want to add this method in my project ProjectLibrary
because I don't want to add reference to System.IO (I want to use this project for android application and PC application).
Is there a possibility to add a method SaveToFile()
usable only in another project? Or create an abstract method in ClassA but define it in other project.
Like this :
using ProjectLibrary;
namespace ProjectOnPC
{
void methodExample()
{
ClassA obj = new ClassA();
// do something
obj.SaveToFile();// => available only in namespace ProjectOnPC
}
}
Thank you for help