I have some code bellow and I get an exception what wrong with this code, I'm just started to study with section of OOP so maybe I made a stupid mistake :

static void Main(string[] args)
        {
            Ishow c1 = new Circle(1, 2, 10);
            c1.show();


interface Ishow
    {
        void show();
    }
 class Circle:Ishow
    {
        //data members
        private double x, y;
        private double radius;

        //constructors
        public Circle()
        {
        }

        public Circle(double X, double Y, double Radius)
        {
            this.x = X;
            this.y = Y;
            this.radius = Radius;
        }

        //Methods
        private void Show()
        {
            Console.WriteLine("Cordinates of Circle : X={0,3} Y={1,3} and Radius={2,3}", x, y, radius);
        }

        public void Print(Ishow x)
        {
            x.show();
        }
    }

the mistake I get is : "....does not implement interface ,member..."
Thanks Sergey

You do not implement your interface indeed!
interface says void show() and you do private void Show() . That's not the same!

Yep, casing sucks sometimes when it bites you, but it is a good thing overall.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.