Bineesh  Viswanath

Bineesh Viswanath

  • NA
  • 1k
  • 777.9k

Difference between Have and haven't DataTable in Function

Nov 12 2013 2:15 AM
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?



Answers (2)