Senator Guerra Souty original series calendar,replica hublot blue steel peach pointer collocation of rolex replica Rome digital scale, track type minute replica watches scale shows that the classical model is swiss replica watches incomparable, wearing elegant dress highlights.
mr-ponna.com

 

YOU ARE HERE: HOME Questions I have a component with 3 parameter and deployed to client side now i changed my dll method which



Real time example for function overloading or method overloading in C#

View(s): 36849

I have a component with 3 parameter and deployed to client side now i changed my dll method which takes 4 parameter. How can i deploy this without affecting the client's code?

Answer 1)

This is very common real time scenario to give backward compatibility to your component/product.

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.

  Asked in:  Mahindra Satyam, ValueLabs   Expertise Level:  Intermediate
  Last updated on Sunday, 01 December 2013
5/5 stars (23 vote(s))

Register Login Ask Us Write to Us Help