Re: e

From Bistre Mosquito, 6 Years ago, written in C#, viewed 522 times. This paste is a reply to e from Rock3r - view diff
URL https://paste.godclan.hu/view/WPhU2hAT Embed
Download Paste or View Raw
  1. using System;
  2.  
  3. namespace a
  4. {
  5.        
  6.         public abstract class Logger {
  7.                 public abstract void Write (string s);
  8.                
  9.                
  10.                 public virtual string GetVersion() {
  11.                         return "LoggerBase 1.0";
  12.                 }
  13.         }
  14.        
  15.         public  class NormalLogger : Logger {
  16.                 public override void Write( string s){
  17.                         Console.WriteLine(s);
  18.                 }
  19.                
  20.                 public override string GetVersion() {
  21.                         return "NormalLogger 1.0";
  22.                 }
  23.         }
  24.        
  25.         public  class ColorLogger : Logger {
  26.                 public override void Write( string s){
  27.                         Console.WriteLine(s);
  28.                 }
  29.                
  30.                 public override string GetVersion() {
  31.                         Console.ForegroundColor = ConsoleColor.DarkBlue;
  32.                         return "ColoredLogger 1.0";
  33.                 }
  34.         }
  35.        
  36.         class LoggerService {
  37.                
  38.                 public LoggerService(Logger a){
  39.                        
  40.                         public string Version() {
  41.                                 return a.GetVersion();
  42.                         }
  43.                         public void Log(string log){
  44.                        
  45.                         }
  46.                 }      
  47.         }
  48.        
  49.         class Program
  50.         {
  51.                 public static void Main(string[] args)
  52.                 {
  53.  
  54.                        
  55.                         Console.ReadKey();
  56.                 }
  57.         }
  58.        
  59. }

Reply to "Re: e"

Here you can reply to the paste above