Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private bool SameValues(ExpiryDates ExpiryDates1, ExpiryDates ExpiryDates2)
- {
- //Assume they are the same value and the look for differences
- bool result = true;
- if (ExpiryDates1.PSL_ExpiryDate.HasValue != ExpiryDates2.PSL_ExpiryDate.HasValue)
- {
- result = false;
- }
- if (ExpiryDates1.MNL_ExpiryDate.HasValue != ExpiryDates2.MNL_ExpiryDate.HasValue)
- {
- result = false;
- }
- if ((ExpiryDates1.MNL_ExpiryDate != null) && (ExpiryDates2.MNL_ExpiryDate != null))
- if (ExpiryDates1.MNL_ExpiryDate.Value != ExpiryDates2.MNL_ExpiryDate.Value)
- result = false;
- if ((ExpiryDates1.PSL_ExpiryDate != null) && (ExpiryDates2.PSL_ExpiryDate != null))
- if (ExpiryDates1.PSL_ExpiryDate.Value != ExpiryDates2.PSL_ExpiryDate.Value)
- result = false;
- return result;
- }
- public class ExpiryDates
- {
- public DateTime? MNL_ExpiryDate { get; set; }
- public DateTime? PSL_ExpiryDate { get; set; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement