public RegistrationInformation RegistrationInformation
    {
        get 
        {
            return new RegistrationInformation()
            {
                FirstName = textFirstName.Text;
                LastName = textLastName.Text;
                Email = textEmail.Text;
                SelectedEvent = dropDownListEvent.SelectedValue;
            };
        }   
    }

解决方案 »

  1.   

    这什么东东哦。加逗号是必须的,你的set勒?
      

  2.   

    属性之间应该是用逗号,不是分号隔开
    public RegistrationInformation RegistrationInformation
    {
      get  
      {
         return new RegistrationInformation()
         {
           FirstName = textFirstName.Text,
           LastName = textLastName.Text,
           Email = textEmail.Text,
           SelectedEvent = dropDownListEvent.SelectedValue
         };
       }   
    }