.net - 为什么 VB.NET 编辑并继续对选项严格关闭不起作用?
问题描述
我一直很难让编辑和继续可靠地工作。
我在这段代码片段中重现了这个问题,其中编辑并继续导致所有变量都变为 Nothing。
如果我删除选项结构并定义所有变量,那么它就可以工作。但我喜欢 option strict off,因为它可以节省大量的开发时间。
option strict off
option Explicit off
Module _Main_Module
Sub Main()
DO
' Get user command:
user_line = CONSOLE.READLINE
AAA=111
Loop
End Sub
End Module
要引起问题,请执行以下步骤...
1. Set breakpoint at line 13
2. run
3. press any key
4. hover over "user_line". It contains what you typed.
5. Add line "BBB=222" after line 13:
6. Press F10 to execute next line
7. hover over "user_line". It is now "Nothing".
解决方案
推荐阅读
- java - Spring Boot 应用程序中的 Java 运行时错误
- python - 使用python将eml转换为markdown
- python - 如何将 .dbf 文件转换为 Pandas DataFrame?
- visual-studio - Windows Forms App (.NET Core) 的项目模板未显示在 Visual Studio 2019 中
- tree - 使用延续传递样式通过广度优先索引获取子树
- reactjs - Material UI 自动完成:从选项中排除默认值
- r - Performing a rolling average with criteria in R
- php - 将数据拆分为 2 个 div 的最简单方法是什么?
- java - Java 8:Stream.filter 未按预期运行
- python - 将保存在 txt 文件中的字典列表转换为数据框