Actually that simple block of code is my example.   

If I have a class that contains that property with the backing field, the
backing field contains the value and is showing properly.  

Take the code in my previous email, the private field CheckListIdField has a
HasValue of true with a Value of 1.  But the field CheckListId has a
HasValue of False with no actual value associated with it.   This is
occurring during the debugging of the application.

If I try to assign that CheckListId to another property in a different
class, that information is not actually transferred over to the properly in
the new class.

var newClass = myNewClass() { newId = previousClass.CheckListId };

newClass.newId.HasValue is false.  And there is no value stored in the
.Value property either.   However, CheckListIdField.HasValue is true, and
CheckListIdField.Value is 1.

I've spent several days going through every possible permutation of what
could be wrong and it seems that the issue is with the Nullable struct
itself.   This was originally working properly in a previous version of
Monodroid, but seems that it got broke at some point up to the 4.2 version. 
I'm still not 100% sure that it's a bug, but i'm stuck on what could be
wrong and what else I could look at that would help me fix the issue.

I will try to put together a small project that demonstrates the issue in
it's entirety, but wanted to see if there was anyone else out there that was
seeing something similar before I spent any time on putting that project
together.  

Chaitanya

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Weird-Nullable-Int32-Issue-tp5709842p5709879.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to