Gets or sets a value indicating whether the control is checked or not.
[Visual Basic] Public Property Checked As Boolean [C#] public bool Checked {get; set;} [C++] public: __property bool get_Checked(); public: __property void set_Checked(bool); [JScript] public function get Checked() : Boolean; public function set Checked(Boolean);
true if the check box is checked; otherwise, false.
The following example evaluates a ListBox selection and the Checked property of a RadioButton. When a specified item is selected from the list box, the PerformClick method of another RadioButton is called. This code assumes that two RadioButton controls and a ListBox have been instantiated on a form.
[Visual Basic]
Private Sub MySub() ' If Item1 is selected and RadioButton2 is checked, click RadioButton1. If ListBox1.ListIndex.Text = "Item1" And _ RadioButton2.Checked = True Then RadioButton1.PerformClick() End If End Sub
RadioButton Class | RadioButton Members | System.WinForms Namespace