传递对象与返回对象不是两回事

 private static void GetName(Name name)
        {

            name = new Name("gan", "fu");
        }


    public class Name
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public Name()
        {

        }
        public Name(string firstName,string lastName)
        {
            this.FirstName = firstName;
            this.LastName = lastName;
        }
       
    }

posted @ 2013-05-31 21:22  Predator  阅读(128)  评论(0编辑  收藏  举报