I have to use these two different class files across my application. How do I inherit those two class files in another class file?
This class file to writes an information log
Public class Log
{
Public void createLog()
{
}
}
This class file gets connection string
public class DataConnector
{
public void Connection()
{
}
}
I want to Inherit from those two classes in this class:
Public class FileOperation
{
public void FileWiter
{
}
}
Are there any different ways to access the class files across my project?
What I have tried:
Public class FileOperation
{
Log oLog=new Log();
DataConnector oDataconn=new DataConnector();
public void FileWiter
{
oLog.createLog();
}
}
Yes, I can use that method, but I'm looking for any other best ways to do this?