Friday, November 14, 2014

Careful using of Contains() Method in .NET

Last week I had a very big problem optimizing a simple file processing program with Database. After a day of searching the reason for the slow work I've found that  the time needed for the process grows exponentially on the number of row in the file. So I started reading line by line, to see which piece of code would cause that. It turned that my List<T>.Contains() method was the problem. I am not a professional .NET Developer so I look at MSDN about that