Hi folks,
I have come accross a behavior of RealmObject which I absolutely don’t understand. I am persisting emails in Realm. These RealmObjects have a property called IsRead:
public partial class Email : RealmObject
{
[PrimaryKey]
public ObjectId Id { get; set; }
[Indexed]
public bool IsRead { get; set; }
....
}
This piece of code behaviors in a very weird way:
private void MarkAsReadAsync(ObjectId id, Email email)
{
dowey = 0;
// Debug.Assert(email.IsRead == false);
if (email.IsRead == false)
{
dowey = 1000;
}
Debug.Assert(dowey == 1000);
}
One would like to think that when isRead equals ‘false’ dowey will equal to 1000, but no:
→ according to line 72 isRead bool should be equal to email.IsRead
→ according to the watch window however, they are different
This is not a pure Intellisense issue, since the binding on that property actually also evaluates to false.
What do I miss with bools here?
Thanks,
Aron