문제

Does it even exist? I want to have a shared variable across a module and a class that belong to the same project.

도움이 되었습니까?

해결책

Shared variables exist but you probably mean the old fashioned Global variables. For that, just declare a variable in an actual module rather than a Class:

Friend Foo As Integer
Public Bar As String = ""

Static vars are quite different

다른 팁

you can look into static variables. that's probably the closest thing to shared variables.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top