I have a foreach
loop like below
foreach (XYZ split in this.splits )
{
// this code is inserted for debug purpose only
bool check = object.ReferenceEquals(splits.First(), split);
.....
}
When I have single element in this.splits
, check is returning false. I have checked by some other way, check is always returning false. Any idea why this is happening?