fork(2) download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. IComparer<string> comp = Comparer<string>.Default;
  9. Console.WriteLine("Compare '-' with '_': " + comp.Compare("-", "_").ToString());
  10. Console.WriteLine("Compare '--' with '-_': " + comp.Compare("--", "-_").ToString());
  11. Console.WriteLine("Compare '-_' with '_-': " + comp.Compare("-_", "_-").ToString());
  12. }
  13. }
Success #stdin #stdout 0.02s 15352KB
stdin
Standard input is empty
stdout
Compare '-' with '_': -1
Compare '--' with '-_': -1
Compare '-_' with '_-': -1