An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Usually these radio buttons belong to the same panel or user control, and the AutoCheck property is set to True. (You can use a separate borderless child panel for M and F radio buttons). Then consider a different approach too:
private void Form_Load( object sender, EventArgs e )
{
Company_radioButton.Checked = true;
}
private void Company_radioButton_CheckedChanged( object sender, EventArgs e )
{
Adjust( );
}
private void Surname_radioButton_CheckedChanged( object sender, EventArgs e )
{
Adjust( );
}
private void Adjust( )
{
CompanyName_textBox.Visible = Company_radioButton.Checked;
Surname_textBox.Visible = Surname_radioButton.Checked;
GivenName_textBox.Visible = Surname_radioButton.Checked;
GivenName_label.Visible = Surname_radioButton.Checked;
}