I'm sure this is basic, but I've just been going round and round on this... I've seen some examples but i'm just not getting it.
I have a class called "LTLMConnection" which has 2 properties.... got it no problem.
I have another class called "Encrypted" which has 5 properties.... got it no problem.
BUT
What i'm trying to do is something like:
Dim MyNewConnection as LTLMConnection
MyNewConnection.Encrypted.ServerName = blahblah
If it makes a difference.... the class of LTLMConnection... internally needs to be able to see the encrypted class below. Here is my NON working code.
Any suggestions would be greatly appreciated!!!
Public Class LTLMConnection
Private Function EncryptValue(NonEncryptedValue As String) As String
'put my encryption code here
End Function
Private Function DecryptValue(EncryptedValue As String) As String
'put my decryption code here
End Function
ReadOnly Property ConnectionString As String
Get
Return "myconnectionblahblah; servername=" & DecryptValue(Encrypted.ServerName)
End Get
End Property
Public Class Encrypted
Private myServerName As String
Private mysqluserid As String
Private mysqluserpwd As String
Private mydatabasename As String
Private myconnectionxml As String
Property ServerName() As String
Get
Return myServerName
End Get
Set(value As String)
myServerName = value
End Set
End Property
Property sqluserid() As String
Get
Return mysqluserid
End Get
Set(value As String)
mysqluserid = value
End Set
End Property
Property sqluserpwd() As String
Get
Return mysqluserpwd
End Get
Set(value As String)
mysqluserpwd = value
End Set
End Property
Property databasename() As String
Get
Return mydatabasename
End Get
Set(value As String)
mydatabasename = value
End Set
End Property
Property connectionxml() As String
Get
Return myconnectionxml
End Get
Set(value As String)
myconnectionxml = value
End Set
End Property
End Class
End Class
I have a class called "LTLMConnection" which has 2 properties.... got it no problem.
I have another class called "Encrypted" which has 5 properties.... got it no problem.
BUT
What i'm trying to do is something like:
Dim MyNewConnection as LTLMConnection
MyNewConnection.Encrypted.ServerName = blahblah
If it makes a difference.... the class of LTLMConnection... internally needs to be able to see the encrypted class below. Here is my NON working code.
Any suggestions would be greatly appreciated!!!
Public Class LTLMConnection
Private Function EncryptValue(NonEncryptedValue As String) As String
'put my encryption code here
End Function
Private Function DecryptValue(EncryptedValue As String) As String
'put my decryption code here
End Function
ReadOnly Property ConnectionString As String
Get
Return "myconnectionblahblah; servername=" & DecryptValue(Encrypted.ServerName)
End Get
End Property
Public Class Encrypted
Private myServerName As String
Private mysqluserid As String
Private mysqluserpwd As String
Private mydatabasename As String
Private myconnectionxml As String
Property ServerName() As String
Get
Return myServerName
End Get
Set(value As String)
myServerName = value
End Set
End Property
Property sqluserid() As String
Get
Return mysqluserid
End Get
Set(value As String)
mysqluserid = value
End Set
End Property
Property sqluserpwd() As String
Get
Return mysqluserpwd
End Get
Set(value As String)
mysqluserpwd = value
End Set
End Property
Property databasename() As String
Get
Return mydatabasename
End Get
Set(value As String)
mydatabasename = value
End Set
End Property
Property connectionxml() As String
Get
Return myconnectionxml
End Get
Set(value As String)
myconnectionxml = value
End Set
End Property
End Class
End Class