syntax - What does a := (colon equals) in VB.NET do? -


possible duplicate:
what use of := syntax?

i've tried hunting down mdsn documentation := in vb.net scoured google linked dead msdn page... purpose of := be?

it names arguments, allowing call method arguments in order other specified in method definition.

for example:

sub foo (byval x long, byval y long)    debug.print (string.format("{0}, {1}", x.tostring, y.tostring)) end function 

can called order of arguments reversed using names:

foo (y:=999, x:=111) 

prints:

111, 999 

this useful when have long list of optional arguments, want specify few of them, , want specify not first ones.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -