在Visual Studio中,打开菜单 工具 -> 选项 -> 项目和解决方案 -> VB 默认设置 -> 选项严格。将其设置为“On”。每次创建新项目时,默认情况下都会启用 Option Strict On。