Just press the button in the test app and it crashes, without even giving the
possibility to debug the code.

This instruction cause the problem: 

IDataContextProvider<IDataContext> provider =
(IDataContextProvider<IDataContext>) new SqlDataContextProvider();

that shortened is:

var provider = (IDataContextProvider<IDataContext>) new
SqlDataContextProvider();

if instead of 
(IDataContextProvider<IDataContext>)
is used 
(IDataContextProvider<ISqlDataContext>)
it works (no covariance needed).



--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Covariance-working-on-simulator-but-crashing-on-device-tp3693885p3694101.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to