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
Post a Comment