I am absolutly new in C# (I came from Java) and I have a very stupid problem
I have to initialize some DateTime fields into an object but I have som
If you search for the error you get, you'll find:
This is because, in C#, single quotes ('') denote (or encapsulate) a single character, whereas double quotes ("") are used for a string of characters.
So you'll try:
DateTime foo = "2014,02,20";
Which yields:
Cannot implicitly convert type 'string' to 'System.DateTime'
Now if you search for that error, you'll find:
int StartYear = 2012;
int StartMonth = 06;
int StartDay = 15;
DateTime dt = new DateTime(StartYear, StartMonth, StartDay);