public int compare(Property o1, Property o2){String VBA_PROJECT = "_VBA_PROJECT";String name1  = o1.getName();String name2  = o2.getName();int  result = name1.length() - name2.length();if (result == 0){if (name1.compareTo(VBA_PROJECT) == 0)result = 1;else if (name2.compareTo(VBA_PROJECT) == 0)result = -1;else{if (name1.startsWith("__") && name2.startsWith("__")){result = name1.compareToIgnoreCase(name2);}else if (name1.startsWith("__")){result = 1;}else if (name2.startsWith("__")){result = -1;}elseresult = name1.compareToIgnoreCase(name2);}}return result;}

public int Compare(Property o1, Property o2){String VBA_PROJECT = "_VBA_PROJECT";String name1 = ((Property)o1).Name;String name2 = ((Property)o2).Name;int num = name1.Length - name2.Length;if (num == 0){if (name1.Equals(VBA_PROJECT, StringComparison.CurrentCulture)){num = 1;}else if (name2.Equals(VBA_PROJECT, StringComparison.CurrentCulture)){num = -1;}else{if (name1.StartsWith("__", StringComparison.Ordinal) && name2.StartsWith("__", StringComparison.Ordinal)){num = String.Compare(name1, name2, StringComparison.OrdinalIgnoreCase);}else if (name1.StartsWith("__", StringComparison.Ordinal)){num = 1;}else if (name2.StartsWith("__", StringComparison.Ordinal)){num = -1;}else{num = String.Compare(name1, name2, StringComparison.OrdinalIgnoreCase);}}}return num;}
