Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding optional parameters to existing sub
Message
From
06/05/2007 13:56:36
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB.NET 1.1
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01222670
Message ID:
01222899
Views:
14
Thanks Rick,

I thought about that approach, but rejected it w/o thinking it through.
My original thought was that I would be maintaining almost identical code in 2 methods, but the correct approach would be to factor out common code to a new method that the original and overloaded methods would call. Thanks for helping me think that through.

Bruce

>Yes everytime the signature of a method changes you defintitely need to recompile. You might be able to get away with polymorphism though by creating an overloaded method that has the new parameter signature without recompiling.
>
>+++ Rick ---
>
>>I have an assembly that defines a bunch of shared subs and functions that are called by a bunch of other assemblies. If I change the signature of a sub (added an optional parameter to the end of the parameter list) in the Common assembly do I need to re-compile all assemblies that might call the Common Assembly? From the errors I generated today, that appears to be the case. Just would like to know why?
>>
>>Thanks
Previous
Reply
Map
View

Click here to load this message in the networking platform