题目:编写个类包含排序方法,整数则排序后输出,字符串则逆序输出  
感觉好像挺简单的,欢迎大家批评指正。   public string sort()
        {
            Console.WriteLine("Please input a string:");
            string s_input = Console.ReadLine();
            char[] myArray;
            try                
            {
                int i_input=int.Parse(s_input);//输入为整型
                s_input=i_input.ToString();
                myArray=s_input.ToCharArray();
                Array.Sort(myArray);
                s_input = new string(myArray);
            }
            catch
            {
                myArray = s_input.ToCharArray();//输入为字符串
                Array.Reverse(myArray);
                s_input = new string(myArray);
            }
            return s_input;
        }
    }    class Program
    {
        static void Main(string[] args)//编写个类包含排序方法,整数则排序后输出,字符串则逆序输出
        {
            MyClass myInstance=new MyClass() ;
            string result=myInstance.sort();
            Console.WriteLine(result);
        }
    }