VB.NET := 运算符 [英] VB.NET := Operator
本文介绍了VB.NET := 运算符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下是什么意思?
Class.Function(variable := 1 + 1)
这个运算符叫什么,它有什么作用?
What is this operator called, and what does it do?
推荐答案
用于给可选变量赋值,而不是对之前的变量赋值.
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
你现在可以做
test(b:= "blaat")
'in stead of
test("", "blaat")
这篇关于VB.NET := 运算符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文