static void Main(string[] args) { int[] nums = { 2, 7, 11, 15 }; Program pro = new Program(); int[] result = pro.TwoSum(nums, 9); Console.WriteLine("[{0},{1}]", result[0], result[1]); Console.ReadKey(); }