I have a List<T> in my class. I want to make sure that it contains unique items.
I have a List<T> in my class. I want to make sure that it contains unique items.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text File
For the query itself, use the ".Distinct()" clause.
Other than that, use a HashSet (.NET 3.5 or higher) or a Dictionary instead for unique values.
Last edited by David Anton; Sep 6th, 2012 at 07:24 PM.
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
Instant C# - VB to C# Converter
Instant VB - C# to VB Converter
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text File