Difference between Have and haven't DataTable in Function
Sir, I need your help in the following subject:-
Please take a look to the functions below:-
Function:1
public void EmployeeAdd()
{
DataTable dtbl=new DataTable()
try
{
EmployeeSp spEmployee =new EmployeeSp()
dtbl=spEmployee.EmployeeAdd()
}
catch(Exception)
{
throw;
}
}
Function:2
public void Function1()
{
try
{
EmployeeSp spEmployee =new EmployeeSp()
cmbEmployee.DataSource=spEmployee.EmployeeAdd()
}
catch(Exception)
{
throw;
}
}
Please explain the difference between above two functions. which will be more faster?