Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inclusion of .vb file in another one
Message
De
18/04/2006 13:54:52
 
 
À
18/04/2006 13:06:07
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01114310
Message ID:
01114343
Vues:
15
Well, after having looked more at it, I am still at the same point. I am looking for a way to adjust my design so any class in a .vb file will be able to see the variables and methods of Framework.App. Here is an example. Presently, I have something like this:

App.vb
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 Namespace
Encrypt.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 Namespace
The application will create an instance of Framework.App at startup. It does it like this:
    Dim LXFramework As Framework.Framework.App = New Framework.Framework.App
The 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.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform