static void Main(String[] ar) { Test t = new Test(); //t.rotate(145, "l"); //Console.WriteLine("\n"); //Console.WriteLine("better array"); //t.betterRotate(145, "l"); learnIcompare comp = new learnIcompare("jay", 25); learnIcompare comp2 = new learnIcompare("ing", 25); //int x = comp.CompareTo(comp2); //Console.WriteLine(t.trailingZero(13)); Console.WriteLine(t.CountNums("1800askgary")); }
public int CompareTo(object obj) { learnIcompare tmp = obj as learnIcompare; if (tmp.value == this.value) { return(0); } else if (tmp.value > this.value) { return(-1); } else { return(1); } }