Visit our site: Vist and Get Free Gifts

Learn To Build: Abstract classes in C#

Visit our site: Vist and Get Free Gifts

Visit our site: Vist and Get Free Gifts

Wednesday, February 12, 2014

Abstract classes in C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AbstractClasses
{
    abstract class myBaseClass
    {
       public abstract int myMethod(int arg1, int arg2);
    }

    class myDerivedClass : myBaseClass
    {
        public override int myMethod(int arg1, int arg2)
        {
            return arg1 + arg2;
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
        }
    }
}

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home