public Label MyLabel; // My Label public void UpdateLabels() { // Set my label to my bet's description, and the label on // my RadioButton to show my cash ("Joe has 43 bucks") this.MyLabel.Text = MyBet.GetDescription(); this.MyRadioButton.Text = this.Name + " has " + this.Cash + " bucks"; }
public void UpdateLabels() { if (MyBet != null) { MyLabel.Text = MyBet.GetDescription(); } else { MyLabel.Text = Name + " hasn't placed a bet"; } MyRadioButton.Text = Name + " has " + Cash + " bucks";; }
public void UpdateLabels() { //set mylabel to my bet's description and the label on my radio button to show cash if (MyBet == null) { MyLabel.Text = String.Format("{0} hasn't placed any bets", Name); } else { MyLabel.Text = MyBet.GetDescription(); } MyRadioButton.Text = Name + " has " + Cash + " bucks"; }