var top100 = (from m in _messages
where m.IsSent == false
select m).Take(100);
foreach (var message in top100)
{
message.IsSent = _sms.SendSMS(message.Source, message.Destination, message.TextMessage);
}
var count = _messages.Count(x => x.IsSent);
I cannot understand why the variable count is equal to 0. I would have thought that I was working with references to my message objects, but if count is 0, does that mean I'm working with copies? What am I doing wrong?