这实际上很尴尬,我不知道该怎么做,我尝试了3种不同版本的语法并搜索了大约4页的溢出,我希望标签包含一个百分号和一个表达式,如何我这样做吗?这是我的逻辑。
AIbasehealth.Text = "%" And Integer / 5
最佳答案
您需要使用ToString
你的表达方法。此外,除法运算符的方向也会产生影响 /
and \
are different where \
is for integer division .
即
AIbasehealth.Text = "%" + (theInteger / 5).ToString
或
AIbasehealth.Text = "%" + (theInteger \ 5).ToString
关于vb.net - Visual Basic 标签包括文本和表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12540312/