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


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  |  Page Processed at 2024-05-18 9:16:15 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search