I have 2 classes that should run a service when calling their Start method, but before it they should:Copy items to F folderOpen S service in remote server if it's not opened alreadyRun #SN service in remote serverThey differ in 1 & 3 steps:In 1st step each one of them may copy different items depending on some parametersIn 3rd step each one call different service nameMy question is should both of them derive from base class and each one will override 1 & 3 steps OR minor overlap between the two classes is not a reason for inheritance?I'm more inclined to the second opinion and I think to do Runner class that has static methods RunService1 & RunService2 and each one will copy items it should copy, open S service and run #S1/#S2 service.Here is example of separated class and using base class:Run1class Run1{    private _src;    private _dest;    private _mode;    public Run1(string src, string dest, int mode, int arg1, int arg2,...)    {       _src = src;       _dest = dest;       _mode = mode;    }    public void Run()    {        PrepareFolders();        OpenServer();        RunInternal();    }    private void PrepareFolders()    {        // copy from src to dest        _src = _dest // after the copying the new source is the destination       // more copying specific folders to dest depending on mode    }    private void OpenServer()    {       var client = new WcfClient();       client.OpenServer();    }    private void RunInternal()    {       var client = new WcfClient();       client.RunService1(arg1, arg2, arg3, ...);    }}Run2class Run2{    private _src;    private _dest;    private _mode;    public Run2(string src, string dest, int mode)    {       _src = src;       _dest = dest;       _mode = mode;    }    public void Run()    {        PrepareFolders();        if(!IfServerOpened())        {             OpenServer();        }        RunInternal();    }    private void PrepareFolders()    {               // This copy the same as in Run1         _src = _dest // after the copying the new source is the destination       // Some other copying specific to Run2    }    private void OpenServer()    {       var client = new WcfClient();       client.OpenServer();    }    private void RunInternal()    {       var client = new WcfClient();       client.RunService2(arg1, arg2);    }}With base class:class Run1 : RunBase { ... }class Run2 : RunBase { ... }abstract class RunBase{   protected string Source { get; private set; }     public RunBase(string src, string dest) { ... }   protected abstract PrepareFoldersInternal();   public void Run()    {        PrepareFolders();        if(!IfServerOpened())        {             OpenServer();        }        RunInternal();    }    public void  PrepareFolders()    {        // copy from src to dest        _src = _dest // after the copying the new source is the destination        Source  = dest;       PrepareFoldersInternal();    }}
Should I use inheritance in my case?
c#;object oriented;design patterns;inheritance