Saturday, April 26, 2025

C# OO - Interface

Program.cs

using System;

namespace LearnCS
{
    interface IPrim
    {
        void IPrimPrint();        
    }

    class Sec : IPrim
    {
        public void IPrimPrint()
        {
            Console.WriteLine("Body of Method must be in Sec Class");
        }        
    }

    class Program
    {
        static void Main(string[] args)
        {
            Sec p1 = new Sec();
            p1.IPrimPrint();            

            Console.ReadLine();
        }
    }
}

No comments:

Post a Comment

Tkinter Introduction - Top Widget, Method, Button

First, let's make shure that our tkinter module is working ok with simple  for loop that will spawn 5 instances of blank Tk window .  ...