Guest User

Guest User

  • Tech Writer
  • 357
  • 120.9k

Return statement

Mar 7 2012 5:08 AM
I am aware a Return statement can return 2 things, 1. A value to be passed to the calling method and 2. An expression.

However given the below code snippet, im unsure what the Return statement is returning

public List<Customer> GetCustomers(string sortExpression)

string sql = @"SELECT CustomerId, CompanyName, City, Country, Version
                    FROM [Customer] ".OrderBy(sortExpression);

return Db.ReadList(sql, Make); 

The Return statement is going to another class entirely, I assume this still falls under an Expression rather than a value but to an external class and method?

Thanks

Answers (1)