Data De-duplication code in C#