Fixed issue with build generics in C# sorting