【发布时间】:2019-03-22 11:28:49
【问题描述】:
我突然在 Visual Studio/VB 中遇到错误,其中 system.windows.forms.control 覆盖了 microsoft.vb.strings 模块,因此昨天还不错的代码现在抛出了错误。
dim cat as string="herd of cats"
dim slice as string=Left(cat,4)
在 Left 上抛出错误,“Public Overloads Property Left As Integer”没有参数,并且它的返回类型不能被索引。”
同时,
dim cat as string="herd of cats"
dim slice as string=strings.Left(cat,4)
没问题。我认为由于某种原因它被 system.windows.forms.control.left 属性超载,我不知道如何修复它或它为什么会发生。我完全卸载并重新安装了 Visual Studio,重新安装了 .net 框架以尝试解决问题,但它仍然存在于新的空白程序中。有什么建议吗?
【问题讨论】:
标签: vb.net visual-studio