I know this question have been asked multiple times, but I have not manage to solve my problem despite trying several suggestions from other similar questions.
Now I ask instead, in hope to get an answer.
I have this XMl file:
<?xml version="1.0" encoding="utf-8"?>
<WebCommands>
<WebCommand>
<FullCommand>@ 05c9fe42-8d89-401d-a9a5-2d82af58e16f This is a test from WebCommands!</FullCommand>
<TimeStamp>18.06.2015 02:56:22</TimeStamp>
</WebCommand>
</WebCommands>
I need FullCommand and TimeStamp to be added to my dictionary
Dictionary<DateTime, string> commands = new Dictionary<DateTime, string>();
How do I:
1. Add the FullCommand and TimeStamp to the dictionary?
2. Convert the TimeStamp string into a proper DateTime?
Parsing to
DateTime
is a culture specific operation. Make sure you use the correct culture in caseCultureInfo.CurrentCulture
isn't viable.