简体   繁体   English

VBNET重载,因为没有可访问的“ int”接受数字参数

[英]VBNET Overload because no accessible 'int' accepts number arguments

I'm getting this visual basic 2010 error : Overload resolution failed because no accessible int accepts number arguments. 我收到此视觉基本2010错误:由于没有可访问的int接受数字参数,因此重载解析失败。 Error at line2 'int' 第2行'int'错误

Private Sub cmdadd_Click(sender As System.Object, e As System.EventArgs) Handles cmdadd.Click
    Dim i As Integer = Int.Parse(txtqfire.Text)
    i += 1
    txtqfire.Text = i.ToString()
End Sub

This is vb.net isn't it? 这是vb.net是吗?

It should be: 它应该是:

Integer.Parse(txtqfire.Text)

You can also use: 您还可以使用:

Int32.Parse(txtqfire.Text)

There is no such method in VB.NET (unlike c#). VB.NET中没有这样的方法(与c#不同)。

The VB.NET conversion is: VB.NET转换为:

Integer.Parse(txtqfire.Text)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 重载解析失败,因为没有可访问的“新”接受此数目的参数 - overload resolution failed because no accessible 'new' accepts this number of arguments 重载解析失败,因为没有可访问的“ ExecuteScalar”接受此数量的参数 - Overload resolution failed because no accessible 'ExecuteScalar' accepts this number of arguments 重载解析失败,因为没有可访问的'writealltext'接受此数量的参数 - overload resolution failed because no accessible 'writealltext' accepts this number of arguments 重载解析失败,因为没有可访问的“参数”接受此数量的 arguments - Overload resolution failed because no accessible 'Parameters' accepts this number of arguments VB.NET MVC重载解析失败,因为没有可访问的“创建”接受此数量的参数 - VB.NET MVC Overload resolution failed because no accessible 'Create' accepts this number of arguments 尝试将stringbuilder文本写入批处理文件时,“由于没有可访问的'New'接受此数目的参数,所以过载解析失败” - “Overload resolution failed because no accessible 'New' accepts this number of arguments” when trying to write stringbuilder text into a batch file 没有可访问的“ New”接受此数目的参数 - No accessible 'New' accepts this number of arguments 没有可访问的'New'接受这个数量的参数 - 错误 - No accessible 'New' accepts this number of arguments - Error 重载解析失败,因为对于这些参数,没有可访问的“新”是最具体的 - Overload resolution failed because no accessible 'new' is most specific for these arguments 重载解析失败,因为没有可访问的“新”是这些参数最具体的: - Overload resolution failed because no accessible 'New' is most specific for these arguments:
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM