ICloneable, cant change clone type?!
well I want my class to have a clone function, but I dont want it to return an Object. I've seen some of .NET's classes which are cloneable and yet their .Clone method doesnt return an object. I have this code:
VB Code:
Public Class someWeirdClass
Implements ICloneable
Public Overloads Function Clone() As [COLOR=RED][b]someClass[/b][/COLOR] Implements ICloneable.Clone
End Function
End Class
it gives me this error: "'Clone' cannot implement 'Clone' because there is no matching function on interface 'ICloneable'."
so what should I do if I want the clone method to return something of type someClass? I dont want to return an object:(