Namespace Framework Public Class App Public aConnection(10) As String Public lInitialize As Boolean = False Public cStartupDrive As String = "" Public Function Initialize() As Boolean End Function End Class End NamespaceEncrypt.vb
Namespace Framework Public Class Encrypt Public Shared cEncrypt As String = "" Public Shared cDecrypt As String = "" ' The function used to encrypt the text Public Shared Function Encrypt(ByVal tcString As String, ByVal tcKey As String) As Boolean End Function End Class End NamespaceThe application will create an instance of Framework.App at startup. It does it like this:
Dim LXFramework As Framework.Framework.App = New Framework.Framework.AppThe application can change a variable value in that instance such as:
LXFramework.cStartupDrive="d:\"
I need Framework.Encrypt to be able to recognize LXFramework.cStartupDrive. However, presently, it cannot because there is no relation between the two classes. Basically, in Framework.Encrypt, I need to be able to have access to LXFramework.cStartupDrive. Is my only hope is to have Framework.Encrypt as defined as a nested partial class in Framework.App? By using a partial class, I will be able to preserve Framework.Encrypt as a separate file and only have the Framework.Encrypt declaration in Framework.App.