公告
财富商城
积分规则
提问
发文
2019-01-26 10:49发布
Deceive 欺骗
What does the following mean?
Class.Function(variable := 1 + 1)
What is this operator called, and what does it do?
It assigns the optional parameter "variable" the value 2.
It is used to assign optional variables, without assigning the previous ones.
sub test(optional a as string = "", optional b as string = "") msgbox(a & b) end sub
you can now do
test(b:= "blaat") 'in stead of test("", "blaat")
VB.NET supports this syntax for named (optional) parameters in method calls. This particular syntax informs Class.Function that its parameter variable is to be set to 2 (1 + 1).
Class.Function
variable
最多设置5个标签!
It assigns the optional parameter "variable" the value 2.
It is used to assign optional variables, without assigning the previous ones.
you can now do
VB.NET supports this syntax for named (optional) parameters in method calls. This particular syntax informs
Class.Function
that its parametervariable
is to be set to 2 (1 + 1).