4 ms·
Beware default values. They're set at the point of invocation at compile time. This isn't a problem, but you need to be aware of it. For this reason it's con
by kogir 15y ago
Beware default values. They're set at the point of invocation at compile time. This isn't a problem, but you need to be aware of it. For this reason it's considered bad form to publicly use default values library assemblies - the callers won't see any change until they too are recompiled.
See http://blogs.msdn.com/b/ericlippert/archive/2011/05/19/optional-argument-corner-cases-part-four.aspx http://blogs.msdn.com/b/ericlippert/archive/2011/05/19/optio...
- xpaulbettsx 15y agoInteresting, didn't know that - good tip
- photon137 15y agoIsn't that a standard feature of x86 function-invocation, ie, argument values are stored in caller's stack? (although C# runs on CLR, but still...)