Hi,
This is a fairly generic question in that I'm just wondering what potential options there are for this.
Say, I have a simple class:
Public Class Example
Private _One As String
Public Property One() As String
Get
Return _One
End Get
Set(ByVal value As String)
_One = value
End Set
End Property
Public Function DoSomething() As Integer
End Function
End Class
EDIT: The above class is just an example of what could be returned from a web service. I won't have access to modify it at all, sorry if I didn't make that clear.
Is it possible to somehow make a clone this class, so that it retains all of the properties values, but hides the fact that there is a Public function?
I'd like to be able to take some existing classes we retrieve from a web service (which we didn't write) and be able to pass them on for use in an application, but without exposing the functions. I don't want to go down the route of creating my own classes that specifically define each property and write the values in (due to the sheer size of some of them), so I'm looking to see if there is anything dynamic I can utilise (maybe there is a way using reflection?).
Any ideas would be greatly appreciated.
Thanks, Mark