变量数据类型 [英] Variables data type

查看:63
本文介绍了变量数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I face a problem with variable data type in vb.net; it is a simple code but I can't get the right result.

x = 57D ^ 23D

何时 span> I 搜索关于最大数据类型使用它来解决此问题,但我找不到任何解决方案.

just using mod function and the result is wrong, when check it by calculator the result is different.I search regarding to what is the largest data type to use it to pass this problem , but I can't found any solution.

推荐答案

你好,

返回什么结果,您期望什么.另外,z的赋值将不会编译,因为这仅对Double类型有效.

What result is being returned and what did you expect. Also, the assignment for z will not compile as this is only valid for type Double.

将这两个语句添加到包含您的代码的文件顶部,然后重新编译以查看错误

Add these two statements to the top of the file which has your code and re-compile to see the errors

Option Strict On
Option Infer Off


这篇关于变量数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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