Variables..
Visual Basic
3
Posts
3
Posters
0
Views
1
Watching
-
Does anyone knows how to share the value of a particular variable but are declared in different class?
declare the variable as shered variable so it can be accessed and modified. For example
Public Class Utility Public Shared SharedVariable As Integer End Class
hope this helpsRupesh Kumar Swami Software Developer, Integrated Solution, Bikaner (India) My Company Award: Best VB.NET article of June 2008: Create Column Charts Using OWC11
-
Does anyone knows how to share the value of a particular variable but are declared in different class?
Use a property
Dim strVar As String = "la la la" Public Property SharedMyVariableWithTheWorld() As String Get Return strVar End Get Set(ByVal value As String) strVar = value End Set End Property
Any suggestions, ideas, or 'constructive criticism' are always welcome.