VB.NET Optional parameters - bound in caller or callee? -


if setup optional parameters on method in vb.net class, optional parameters supplied caller or called method?

in c++, supplied called method. in c#, supplied caller method.

wondering how worked in vb.net.

caller.

another caveat c# folks might not know c# version of optional parameters suffers same limitations of vb version (which, way, has been in vb since vs 2002). namely, optional parameter value compiler trick, optional parameter value not compiled method called, instead caller.

read more here: caveats of c# 4-0 optional parameters


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -