public int isValid() { if (LeftSideInt.HasValue && RightSideInt.HasValue) { if (LeftSideInt.Value != RightSideInt.Value) { return(1); } else { return(0); } } else if (LeftSideInt.HasValue) { return(1); } else if (RightSideInt.HasValue) { return(1); } else { if (LeftSide.Trim() != RightSide.Trim()) { return(1); } else { return(0); } } }
public int isValid() { string cleanedLeftSide = LeftSide.Trim().TrimStart(new char[] { '\'' }).TrimEnd(new char[] { '\'' }); string cleanedRightSide = RightSide.Trim().TrimStart(new char[] { '\'' }).TrimEnd(new char[] { '\'' }); if (cleanedLeftSide.Contains(cleanedRightSide)) { return(1); } else { return(0); } }