The first 'true' you receive you explicitly cast the object on the function call to a DataContext type. The second you're comparing a ModelDataContext.Context object - which I'm not sure if it's a DataContext type - if not - then you're comparing unlike objects and the call will fail. Try explicitly casting the ModelDataContext.Context, and for overkill the newdc to a DataContext type and do the comparison that way. ie: Console.WriteLine((DataContext) ModelDataContext.Context == (DataContext) newdc);
Q
Q The First Timelord
@Q The First Timelord