By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,219 Members | 2,423 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,219 IT Pros & Developers. It's quick & easy.

Synchronized Method

P: n/a
I have asked previously how I would implement a Synchronised method similar
to the Hashtable Class.
I have a class derived from the CollectionBase Class.
Nick Hall kindly replied that HashTable defines a private class which
inherits from Hashtable and overrides the key methods (Add, Clear etc).
At first this sounded easy but now I need some help.
So far I have

Public Class Documents
Inherits System.Collections.CollectionBase
'...
'... Various functions including Add, Clear, etc are defined here
'...

Public Shared Function Synchronised( _
ByVal Docs as Documents) As Documents
'What goes here???
End Function

Private Class SyncDocs Inherits Documents
'...
'... Overrides Add, Clear, etc functions
'...
End Class
End Class

I presume for this to work I need to type cast the documents class (Me) to a
SyncDocs Class.
How do I do that?

Thanks for your help
Fred
Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.