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
It will not work because I have to Dim x in the sub add() so what I want is a way to pass that value of x to the sub add().