开发者

What is the definition of ":=" in vb

开发者 https://www.devze.com 2022-12-13 06:53 出处:网络
I came across some sample code in VB.Net which I have some experience with and kinda having a duh moment figuring out the meaning of:=.

I came across some sample code in VB.Net which I have some experience with and kinda having a duh moment figuring out the meaning of :=.

RefreshNavigationImages(bForward:=True, startIndex:=-1)

The sig for this method is RefreshNavigationImages(boolean, int). Is this a default value if null? Like "bIsSomething ?? false"?

Tried to bing/google but they just don't like searching for operators especially if it's 开发者_如何学JAVAonly 2 chars.


They are named parameters. They let you specify values for arguments in function calls by name rather than order.


The := indicates the use of named parameters. Rather than relying on the order of the parameters in the method declaration, named parameters allow you to specify the correlation of parameters to values by specifying the name of the parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消