Manually. Here's an example. I am comparing an old and new value in a
property Set to see if the value has changed.
If both don't have a value, then nothing has changed.
If both have a value and the values don't match, it's changed.
//check to see if the value has changed; this is nullable, so it's different
//if the start date is not null and the value is null or vice versa, it has
changed
//if the start date has a value and the value has a value and they aren't
equal, it has changed
if ((_SignUpEndDate.HasValue != value.HasValue)
|| (SignUpEndDate.HasValue && value.HasValue && _SignUpEndDate.Value !=
value.Value))
{
//value is different
}
Hope that helps.
RobinS.
GoldMail, Inc.
-------------------------------------------
"Alhambra Eidos Kiquenet" <(E-Mail Removed)>
wrote in message news:C5293899-21A2-4464-9ACB-(E-Mail Removed)...
> Hi mister,
>
> I have an object with two properties, of type DateTime? (Nullable).
>
> Which is the best way for comparing ? The value of datetime can be null,
> and
> another value cannot be null, or two values are null, or two values aren't
> null.
>
> if (tarea.Fcprioridad < tarea.Fcentrega)
>
> Can I use Comparer ??
> thanks in advance. Greetings.
>
> --
> http://www.alhambra-eidos.es/web2005/index.html
> www.kiquenet.net
> http://www.setbb.com/putainformatica...opic.php?p=843
> www.trabajobasura.com/solusoft
>