在VB中是否像在C ++中一样有%? [英] Is there a % in VB like in C++?

查看:104
本文介绍了在VB中是否像在C ++中一样有%?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我试图使某些事情正常工作(很明显),并且遇到了一些障碍,我想做一个简单的事情:

So I''m trying to get something working (Obviously) and I''m running into a bit of a snag, I''d like to do a simple:

If (intNum1 % intNum2 = 0) Then
   'Do Something
End If


没什么不同寻常的,只是希望能够使它变得如此简单,而不必为相同的功能做其他工作.


Nothing too out of the ordinary, just would like to be able to make it as simple as that without having to do other work for the same function.

推荐答案

是的: Mod运算符 [

如果%运算符为模,则可以使用mod函数.
If % operator mean modulo, then you can use mod function.


这篇关于在VB中是否像在C ++中一样有%?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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