mark override when overriding ToString : ToString : Class C# Examples


C# Examples » Class » ToString »

 

mark override when overriding ToString









    
using  System;

public  class  Thing  {
        public  int  i  =  2;
        public  int  j  =  3;

        override  public  string  ToString()  {
                return  String.Format("i  =  {0},  j  =  {1}",  i,  j);
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Class
» ToString