Thread Safety through Self-Loading Collections
page 4 of 7
by David Penton
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 31364/ 66

Considerations

When choosing the classes for TPrimaryKey, consider that the method GetHashCode() should return an integer value that is appropriate for storage in a collection. Additionally, you may want to use the IEquatable<T> interface to assist you with equality checks. You may not have a class for TValue that exposes the TPrimaryKey value. That is ok - it just limits some of your options for operations like the Remove method. Of course, Remove is a virtual method so you may provide your own implementation there.


View Entire Article

User Comments

No comments posted yet.






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-05-01 6:17:43 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search