+ =在Visual Basic中是什么意思? [英] What does += mean in Visual Basic?

查看:157
本文介绍了+ =在Visual Basic中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用Google搜索此问题的答案,但找不到它.我正在VB.Net上工作.我想知道VB.Net中的运算符+ =是什么意思?

I tried to google the answer for this but could not find it. I am working on VB.Net. I would like to know what does the operator += mean in VB.Net ?

推荐答案

这意味着您要将值添加到变量的现有值中.因此,例如:

It means that you want to add the value to the existing value of the variable. So, for instance:

Dim x As Integer = 1
x += 2  ' x now equals 3

换句话说,就是这样做:

In other words, it would be the same as doing this:

Dim x As Integer = 1
x = x + 2  ' x now equals 3

供将来参考,您可以在 MSDN .

For future reference, you can see the complete list of VB.NET operators on the MSDN.

这篇关于+ =在Visual Basic中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆