VB.NET相当于excel的商函数

问题描述

| VB.NET是否具有像excel中那样获得商的功能。
Quotient(12,6)
    

解决方法

尽管我在评论中写了什么,但对于它们两个来说,整数除法都是使用相同的运算符执行的,即
\\
(注意,它不是常规斜杠,而是反斜杠)。
5\\2 => evaluates to an integer 2
5/2 => evaluates to a double 2.5
(请注意,此处的返回类型适用于Integer操作数,但与操作数的类型不同) 有关这些运算符的VB.NET版本的更多信息,请参见: /运算符(Visual Basic) \\运算符(Visual Basic)     ,
quotient = 12 \\ 6 \' filler filler filler
    ,在没有等效的VBA的情况下,您始终可以使用
WorksheetFunction
,例如:
WorksheetFunction.Quotient(Arg1,Arg2)
    

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...