Answer 1)
Solution in C# / VB.NET: Instead of adding 4th parameter to the existing method, write new overloaded method with 4 parameters.
So when old application calls this method, method with 3 parameter will execute. And method with 4 parameter will be used by new application. That way we can provide backward compatibility to old application.
Solution in VB.NET: If you are developing using VB.NET language, you can take advantage of optional parameters to accomplish the same.
|