using System; public class Class { public int this[ int x, params object[] args] { get { foreach(Object y in args) { Console.WriteLine(y.ToString()); } return x; } } } public class Testing { public static void Main() { Class x = new Class(); Console.WriteLine( x[4] ); Console.WriteLine( x[4,42] ); } }