custom-compare

Custom sorting problem, always force 0 to back of ascending order?

Premise This problem has a known solution (shown below actually), I'm just wondering if anyone has a more elegant algorithm or any other ideas/suggestions on how to make this more readable, efficient, or robust. Background I have a list of sports competitions that I need to sort in an array. Due to the nature of this array's populati...

LinQ distinct with custom comparer leaves duplicates

I've got the following classes: public class SupplierCategory : IEquatable<SupplierCategory> { public string Name { get; set; } public string Parent { get; set; } #region IEquatable<SupplierCategory> Members public bool Equals(SupplierCategory other) { return this.Name == other.Name && this.Parent == other....

iPhone contacts app styled indexed table view implementation

My Requirement: I have this straight forward requirement of listing names of people in alphabetical order in a Indexed table view with index titles being the starting letter of alphabets (additionally a search icon at the top and # to display misc values which start with a number and other special characters). What I have done so far: 1...