Can someone tell me why the debugger treats my string variable named Date as a DateTime object?
the code:
public class HourRegistration { public string Date { get; set; } }
See screen capture:

Using .NET framework 4.5, VS-2015
Thanks!
Update:
Reducing the code to the minimum possible, I found an obvious problem.
Minimum Abbreviated Code:
namespace ConsoleApplication1 { class Program { static void Main(string[] args) { DoSomething(); } public static void DoSomething() { DateTime Date = DateTime.ParseExact("asdasd", "dd/MM/yyyy", CultureInfo.InvariantCulture); } public class HourRegistration { public string Date { get; set; } } } }
Screenshot: 
It was another variable in a different context, named exactly like a string, and the debugger showed the details of another object (based on context)
DDan
source share