From a couple of my Assemblys like AssemblyA, AssemblyB, AssemblyC, AssemblyD I am calling a method in AssemblyE
for example:
DialogHelper.DisplayComments( param1,2,3,4) ;
now for some of those assemblies and not all of them I need to have an Overloaded version of DisplayComments() method that takes one more new parameter that I want to pass to:
DialogHelper.DisplayComments(param1,2,3,4,"5") ;
So one way is what I did: create an overload and pass the value.
But I was wondering if in .NET and Obeject-Oriented world is there any other elegant way of doing this so I can pass this value to that Assembly and that method?
In
OOPworld overloading is already very elegant.If you want to try something else, can add Optional parameters, like for example
Good luck