سؤال

Anyone seen this MonoRail error before and know what it means?

Unexpected item on the stack: found UCampus.Core.Models.Nested.Hours, expecting UCampus.Core.Models.Business

I'm saving a Business object when this error occurs, Hours is a child of a child of Business.

Thanks, Justin

هل كانت مفيدة؟

المحلول

In the Hours class it for some reason was overriding the GetHashCode method and that was causing this peculiar exception. Any idea why they would've been overriding GetHashCode??

//public override int GetHashCode()
        //{
        //    unchecked
        //    {
        //        return (GetHours(Open) * 397) ^ GetHours(Close);
        //    }
        //}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top