Comparing string to char array
public class Util { public static int Compare(char[] c, String s) { char[] x = s.ToCharArray(); for (int i = 0; i < x.Length; i++) { if (c[i] < x[i]) return 1; if (c[i] > x[i]) return -1; } return 0; } }