未使用的局部变量错误VB.NET [英] Unused local variable error VB.NET

查看:109
本文介绍了未使用的局部变量错误VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我最近将我的vb6项目转换为VB.NET。



我得到当我构建时出错......



未使用的局部变量



如果您知道解决这个问题,请在这里发布



谢谢。

Hi,

I recently converted my vb6 project to VB.NET.

I get an error when I build that says....

Unused local variable

If you know the solution to this issue, please post it here

Thank you.

推荐答案

永远不要将未使用的变量留在代码。只需删除它们。



另外,请记住:如果您在代码中收集警告,则根本无法使用警告机制。开发无警告!



-SA
Never leave unused variables in the code. Just remove them.

Also, remember: if you collect warnings in your code, you will not be able to use warning mechanism at all. Develop warning-free!

—SA


你可以通过双击Visual Studio中错误窗格中的错误行来定位变量来解决这个问题,然后只需删除该变量。



然后重建。
You can solve this by locating the variable by double clicking the error line in the error pane in Visual Studio, and then just remove that variable.

Then rebuild.


有什么难以理解的?你声明了一个变量,然后就没有使用它。它不会阻止您的代码运行。这只是一个警告。
What's so hard to understand? You declared a variable, then you didn't use it. It's not going to stop your code from running. It's just a warning.


这篇关于未使用的局部变量错误VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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