0
Sub main()
Dim x as integer=5
Sub add()
End sub
Sub add()
Dim z as integer = 5 + x
Console.writeline(z)
End sub y
它不会工作,因为我要在sub add()
Dim x
所以我想是的x
该值传递给sub add()
的方式。传递的东西的价值从子main()中另一个子程序
你需要上晚自习[在VB范围(http://stackoverflow.com/a/33249045/1070452); *将参数传递给方法*的基本任务,所有在您读取[ask]并参加[tour] – Plutonix