I realize this is a very basic question, but is it possible to do this:
The question is, can I overload a method with the same parameters for both, but have 1 be a "void" and the other return a boolean value? I know MessageBox.Show() does something like this but I can't remember how...
TIA
Code:
public void PersistData(DataSet ds)
{
try
{
sqlCommand.ExecuteNonQuery()
}
catch (Exception ex)
{
throw ex
}
)
public bool PersistData(DataSet ds)
{
try
{
sqlCommand.ExecuteNonQuery()
}
catch (Exception ex)
{
return false
}
return true
}
The question is, can I overload a method with the same parameters for both, but have 1 be a "void" and the other return a boolean value? I know MessageBox.Show() does something like this but I can't remember how...
TIA