by Njål

File Format/Extension CSV

 

imageHere is a CSV(comma separated values) list I put together with over 10500 file formats and descriptions.

I got the content from various websites – by making a small C# program that screenscraped the content that I wanted to collect.

Download the csv file here.

If you want to include this list directly in your c# code – then grab this this file.

by Njål

C#: Removing duplicate entries using LINQ

Here’s a pretty neat line of code that removes duplicate entries (ID is specified by you) from a IEnumerable:

class MyTestObject{
    public string MyKey;
    public int SomeValue;
    ...
}


//myList contains MyTestObjects - some of these objects
//have the same MyKey value, and I only want objects with unique MyKey values

var uniqueCollection = myList.GroupBy(x => x.MyKey).Select(y => y.First());