Search   

Friday, February 10, 2012

Support » Support Forum

Register  Login

 Menu  
 
    

 Welcome!  
 


Welcome to the NDO support forum!

kreis.gif Please register/login at the site if you want to post a thread. We sometimes copy support mails of common interest to the forum. They appear with anonymous sender.
kreis.gif Please post your messages in English language if possible. You can do your posts also in German, we will translate your post and our answer so that all users of the forum can read your posts.
kreis.gif The forum software requires that javascript is enabled.
kreis.gif Please do not insert licence information or licence keys in forum posts.
kreis.gif If you know a good answer to a post of another user, feel free to reply!
kreis.gif The forum is monitored. We reserve the right to remove posts we consider not to be useful for other forum users.

   Print   

      
 NDO Support Forum  
 
SearchForum Home
  NDO-Forum postings in english please, if possible.  Developing with NDO  Mystic Exceptio...
 Re: Mystic Exception when persisting
 
 3/26/2007 2:23:33 PM
Mirko
109 posts
5th


Re: Mystic Exception when persisting

Hi Tobias,

DateTime is a ValueType too. It gets initialized by the .NET system with DateTime.MinValue. So don't check for "null", but for DateTime.MinValue.

As for the debugging issue: Touch the text of the source containing your GetHashCode method, do not compile, just hit F5.

Regards
Mirko

 3/26/2007 5:03:50 PM
schoetbi
15 posts


Re: Mystic Exception when persisting
Hi Mirko,

I changed the GetHashcode to
public override int GetHashCode()
        {
            int hc = 0;
 //if(lastChanged != DateTime.MinValue)        
 //hc ^= this.lastChanged.GetHashCode();      // When I remove the comment sign the error happens. Otherwise it works
            if(name != null)
                hc ^= this.name.GetHashCode();
            if(lstParameter !=null)
                hc ^= this.lstParameter.GetHashCode();
            if (ParentGroup != null)
                hc ^= this.ParentGroup.Id.GetHashCode();
           
            return hc;
        }

So its probably not the checking for null that causes the problem.

Regards,
Tobias
 3/26/2007 5:26:48 PM
Mirko
109 posts
5th


Re: Mystic Exception when persisting

Hi Tobias,

sorry for not seeing this earlier. It seems to be the same bug we discussed via EMail. Try the following:

DateTime lc = lastChanged;
if (lc != DateTime.MinValue)
    hc ^= lc.GetHashCode();

Since DateTime.MinValue has a hash code too, you can omit the test for MinValue.

We'll publish a bug fix for the phenomen next week.

Best Regards:
Mirko

  NDO-Forum postings in english please, if possible.  Developing with NDO  Mystic Exceptio...
  SearchSearch  Forum HomeForum Home