public IQueryable<Profile> FindAllProfiles(string CountryFrom, string CountryLoc)
{
....
}
For the above method, is it possible to have nullable input parameters CountryFrom and CountryLoc? When I call this method, I have to pass in the 2 values otherwise I may get exceptions. Any ideas..?
If you’re writing the method and using C# 4, you can use optional arguments.
With it, you can put a default value for the arguments.
If you’re just using the function, then you can pass-in String.Empty instead of a null string.