B
Bob Trabucco
Does anyone know how you can do an upcase in VB.NET?
Example:
Public Class Class1
Private s As String = "Hello World"
Protected Property Prop1() As String
Get
Return s
End Get
Set(ByVal Value As String)
s = Value
End Set
End Property
End Class
Public Class Class2
Inherits Class1
Public Property Property1()
Get
Return MyBase.Prop1
End Get
Set(ByVal Value)
MyBase.Prop1 = Value
End Set
End Property
End Class
And I attempt to call it using:
Dim c1 As New Class1
Dim c2 As Class2 = c1
Debug.WriteLine(c2.Property1)
Gives a casting error on the Dim c2 line.
So - if I have a class that was created by something not under my control
yet I need to access the protected memebers (in my specific example I have
TCPListener creating a TCPClient and I want to access the RemoteEndPoint) is
there any way to do this?
Thanks in advance...
Bob
Example:
Public Class Class1
Private s As String = "Hello World"
Protected Property Prop1() As String
Get
Return s
End Get
Set(ByVal Value As String)
s = Value
End Set
End Property
End Class
Public Class Class2
Inherits Class1
Public Property Property1()
Get
Return MyBase.Prop1
End Get
Set(ByVal Value)
MyBase.Prop1 = Value
End Set
End Property
End Class
And I attempt to call it using:
Dim c1 As New Class1
Dim c2 As Class2 = c1
Debug.WriteLine(c2.Property1)
Gives a casting error on the Dim c2 line.
So - if I have a class that was created by something not under my control
yet I need to access the protected memebers (in my specific example I have
TCPListener creating a TCPClient and I want to access the RemoteEndPoint) is
there any way to do this?
Thanks in advance...
Bob