interface implementation??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hemantc87
    New Member
    • Mar 2010
    • 13

    interface implementation??

    Code:
    class Program
        {
            interface math
            {
                void one();
                void two();
            }
            class test : math
            {
                void math.one()
                {
                   
                }
                void math.two()
                {
                    
                }
                
             public void sort(math ob)
                {
                    Console.WriteLine("enter number");
                   //calculation
                }
            }
    
            static void Main(string[] args)
            {
                math ob = new test();
                test ob1=new test();
    
                ob1.sort(ob);
                
                
                Console.ReadKey();
            }
        }
    one two functions didnt have anything to do...still is it the right way to implement the interface.but was it really required if the methods didnt have any implementation in them??
Working...