public bool IsHisName(string unitName) { if (OriginalName == null || unitName == null) { return(false); } return(OriginalName.ToLower().Equals(unitName.ToLower())); }
private bool sameAsOriginal(string newName, bool shouldCompareUsingOriginalCase) { var newNameToCheck = newName.Trim(); var originalNameToCheck = OriginalName; if (!shouldCompareUsingOriginalCase) { newNameToCheck = newNameToCheck.ToLower(); originalNameToCheck = OriginalName.ToLower(); } return(!string.IsNullOrEmpty(OriginalName) && string.Equals(originalNameToCheck, newNameToCheck)); }
private bool sameAsOriginalInLowCase(string newName) { var newNameToLower = newName.ToLower().Trim(); return(!string.IsNullOrEmpty(OriginalName) && string.Equals(OriginalName.ToLower(), newNameToLower)); }