Looking for the best way to update a variable in a different class. Below is a rough outline of the situation.
I am wondering if in fnSendEmailTo if I can access the Property in CB? If not, how would you do something like this?
Code:file: CB.vb ---------------------------- Imports Project.Functions Public Class CB Private _CurrentEmailsSentCount As Integer = 0 Private _ID As Integer = 23 Public Property CurrentEmailSentCount() As Integer Get Return _CurrentEmailsSentCount End Get Set(value As Integer) _CurrentEmailsSentCount = value End Set End Property Public Function fnStart() As String CurrentEmailSentCount = fnGetJobPostingID_EmailsSentCount(_ID) Return sRetVal End Function End Class file: Functions.vb ---------------------------- Public Class Functions Public Shared Function fnSendEmailTo(...various parameters..) As String '... code If iEmailSent = 1 Then 'update the _CurrentEmailsSentCount variable here from class CB CurrentEmailSentCount += 1 End If '... code End Function End Class




Reply With Quote