1
Answer

Return statement

Guest User

Guest User

13y
1.3k
1
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)