谁能告诉我为什么以下情况不会发生?
List<DateTime> timestamps = new List<DateTime>();
timestamps.Add(DateTime.Parse("8/5/2011 4:34:43 AM"));
timestamps.Add(DateTime.Parse("8/5/2011 4:35:43 AM"));
foreach(DateTime x in timestamps)
{
if (Object.ReferenceEquals(x, timestamps.First()))
{
// Never hit
Console.WriteLine("hello");
}
}
Run Code Online (Sandbox Code Playgroud) c# ×1