如何返回程序的开头处?
											创建一个SqlConnection的方法,要求返回这个SqlConnection连接,如果连接出错,则返回程序的开头处。我的代码是:public SqlConnection GetMyCon()
{
string ConnectionStr="server=localhost;database=Mydata;uid=sa;pwd=;";
try
{
SqlConnection Mycon = new SqlConnection(ConnectionStr);
Mycon.Open();
return Mycon;
}
catch(SqlException e1)
{
MessageBox.Show(e1.Message, "提示");
return;
}
}
但这个“return;”不是返回程序的开头处,而且这个“return;”编译的时候出错,该怎么写呢?

 
											





 
	    


 
											 
										
					
	


 
										
					
	