i have the following code
protected void btnSelect_Click(object sender, EventArgs e)
{
try
{
int count = 0;
foreach (GridViewRow i in gvDetails.Rows)
{
CheckBox chk = new CheckBox();
chk = (CheckBox)i.FindControl("chkSelect");
if (chk.Checked == true)
{
count = count + 1;
}
}
if (count ==0)
{
lblMessage.Text = "Please select a student First";
}
in the above c# code I want to exit from the event if count ==0 so what statement should I give next. In
vb I can give exit sub what in case of C# pls help me asap