private void EditInfoDialog_Load(object sender, EventArgs e) { UserAPI.UserDescription description = UserAPI.GetUserDescription(Program.users, Program.userinfo.userid); UserName.Text = description.username; oldUserName = description.username; oldPass = description.passwd; UserContact.Text = description.contact; (Controls["radioSex" + description.sex] as RadioButton).Checked = true; }