C# does not allow optional paramters, but the good news is that overloading a method is easy, just write:
public void myProc(SqlParamter params[])
{
//Do something
}
public void myProc()
{
//Do something
}
If you absolutely need to have the parameter in the function you will need to pass something either a valid SqlParameter object or null will work but be sure you are validating your params
avender
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment