vb.net Visual Basic 2013“预期表达式”。

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19599979/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 15:38:08  来源:igfitidea点击:

Visual Basic 2013 "Expression expected."

vb.netvisual-studio

提问by Stuneris

I have problem on this line:

我在这条线上有问题:

TextBox1.Text = '0'

More code:

更多代码:

Private Sub Button18_Click(sender As Object, e As EventArgs) Handles Button18.Click
    TextBox1.Text = '0'
End Sub

I getting error Expression expected.

我收到错误表达式预期。

采纳答案by jpw

Been a while since I worked with VB but I'm pretty sure you need to use double quotes so this line:

自从我使用 VB 以来已经有一段时间了,但我很确定您需要使用双引号,所以这一行:

TextBox1.Text = '0'

should be:

应该:

TextBox1.Text = "0"

回答by Gustavo Villarreal

Me.OtrosTableAdapter.Update1(id:=@id,nombre:=@Nombre,precio:=@Precio,Entrad:=@Entrad,salid:=@salid) which is the error? Every time I go to compile , it fails with the "@ "

Me.OtrosTableAdapter.Update1(id:=@id,nombre:=@Nombre,precio:=@Precio,Entrad:=@Entrad,salid:=@salid) 这是错误?每次我去编译时,它都会以“@”失败