Re: e

From Bistre Mosquito, 7 Years ago, written in C#, viewed 617 times. This paste is a reply to e from Rock3r - go back
URL https://paste.godclan.hu/view/WPhU2hAT/diff Embed
Viewing differences between e and Re: e
using System;

namespace a
{
        
        public abstract class Logger {
                public abstract void Write (string s);
                
                
                public virtual string GetVersion() {
                        return "LoggerBase 1.0";
                }
        }
        
        public  class NormalLogger : Logger {
                public override void Write( string s){
                        Console.WriteLine(s);
                }
                
                public override string GetVersion() {
                        return "NormalLogger 1.0";
                }
        }
        
        public  class ColorLogger : Logger {
                public override void Write( string s){
                        Console.WriteLine(s);
                }
                
                public override string GetVersion() {
                        Console.ForegroundColor = ConsoleColor.DarkBlue;
                        return "ColoredLogger 1.0";
                }
        }
        
        class LoggerService {
                
                public LoggerService(Logger a){
                        
                        public string Version() {
                                return a.GetVersion();
                        }
                        public void Log(string log){
                        
                        }
                }        
        }
        
        class Program
        {
                public static void Main(string[] args)
                {

                        
                        Console.ReadKey();
                }
        }
        
}

Reply to "Re: e"

Here you can reply to the paste above