| c# Programming Glossary: icomparerHow would I sort a list of files by name to match how Windows Explorer displays them? http://stackoverflow.com/questions/1012985/how-would-i-sort-a-list-of-files-by-name-to-match-how-windows-explorer-displays  array of FileInfo objects by name class FileInfoComparer IComparer FileInfo public int Compare FileInfo x FileInfo y return string.Compare.. 
 What's a good, generic algorithm for collapsing a set of potentially-overlapping ranges? http://stackoverflow.com/questions/1233292/whats-a-good-generic-algorithm-for-collapsing-a-set-of-potentially-overlapping  IEnumerable Range T Collapse T this IEnumerable Range T me IComparer T comparer  List Range T orderdList me.OrderBy r r.Start .ToList.. Range T Collapse T this IEnumerable Range T ranges IComparer T comparer  if ranges null ranges.Any  yield break if comparer.. 
 What's the most elegant way to bubble-sort in C#? http://stackoverflow.com/questions/1595244/whats-the-most-elegant-way-to-bubble-sort-in-c  Comparer T .Default public void BubbleSort T IList T list IComparer T comparer bool stillGoing true while stillGoing  stillGoing.. 
 C# Sort and OrderBy comparison http://stackoverflow.com/questions/1832684/c-sharp-sort-and-orderby-comparison  n n.Name new NameComparer class NameComparer IComparer string public int Compare string x string y return string.Compare..   Why not measure it class Program class NameComparer IComparer string  public int Compare string x string y  return string.Compare.. 
 Can I specify my explicit type comparator inline? http://stackoverflow.com/questions/188120/can-i-specify-my-explicit-type-comparator-inline  MiscUtil library contains a ProjectionComparer to build an IComparer T from a projection delegate. It would be the work of 10 minutes.. 
 Natural Sort Order in C# http://stackoverflow.com/questions/248603/natural-sort-order-in-c-sharp  sort in C# for an FileInfo array I am implementing the IComparer interface in my sorts.  c# sorting file natural sort   share.. in Windows and use it as the comparison function in your IComparer DllImport shlwapi.dll CharSet CharSet.Unicode private static.. psz1 string psz2 public sealed class NaturalStringComparer IComparer string public int Compare string a string b  return SafeNativeMethods.StrCmpLogicalW.. 
 Can we define implicit conversions of enums in c#? http://stackoverflow.com/questions/261663/can-we-define-implicit-conversions-of-enums-in-c   IEquatable TDerived  IComparable TDerived  IComparable IComparer TDerived where TValue struct IComparable TValue IEquatable TValue..  return Value.CompareTo TDerived obj .Value  return 1  int IComparer TDerived .Compare TDerived x TDerived y  return x null 1  y.. 
 Silverlight and ArrayList http://stackoverflow.com/questions/4181800/silverlight-and-arraylist  kept in Silverlight. IEnumerator IEnumerable ICollection IComparer IDictionary IDictionaryEnumerator DictionaryEntry IEqualityComparer.. 
 Look if a method is called inside a method using reflection http://stackoverflow.com/questions/5741350/look-if-a-method-is-called-inside-a-method-using-reflection   return GetEnumerator  internal class CompareMembers T IComparer T IEqualityComparer T where T class IMemberReference  public.. 
 How do I create dynamic properties in C#? http://stackoverflow.com/questions/947241/how-do-i-create-dynamic-properties-in-c  return null  set  properties name value   class Comparer T IComparer ObjectWithProperties where T IComparable string m_attributeName.. 
 Use own IComparer<T> with Linq OrderBy http://stackoverflow.com/questions/985657/use-own-icomparert-with-linq-orderby  own IComparer T with Linq OrderBy  I have a generic List MyClass where MyClass.. 2 which is nasty in this case. Now I want to use my own IComparer T with this. It looks like this public class MyComparer IComparer.. T with this. It looks like this public class MyComparer IComparer Object public int Compare Object stringA Object stringB  String.. 
 |