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
You can either parse a string, like yours. Or you can instansiate a DateTime object with numbers.
DateTime date1 = new DateTime(1998, 04, 30); DateTime date2 = DateTime.ParseExact("1998,04,30", "yyyy,MM,dd", CultureInfo.InvariantCulture);