Why does a private implementation of ICloneable work?

  • Thread starter Thread starter cmay
  • Start date Start date
C

cmay

Can someone explain why you can implement ICloneable with a private
function and it works?

e.g.

Imports System
Public Class BusinessObject
Implements ICloneable

Private Function privateClone() As Object Implements
ICloneable.Clone
Dim MyClone As Object = makeClone()
Return MyClone
End Function

End Class

Does that fact that the Clone is public on ICloneable mean that the
"private" above is ignored when the object is being dealt with as type
ICloneable?
 
The modify tag, private, does not apply to the compiler. It is capable of
calling the method. The tag is applicable only to calling code.

--
Warm Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley 2006
Blog: http://msmvps.com/blogs/Alvin/
 
Back
Top