سؤال

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