mark override when overriding ToString : ToString « Class « C# / CSharp Tutorial






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);
    }
}








7.48.ToString
7.48.1.How to override the ToString() method
7.48.2.mark override when overriding ToString
7.48.3.Demonstrate ToString()
7.48.4.override ToString
7.48.5.Format value in ToString method
7.48.6.override ToString method twices