Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Complex string parsing
Message
From
19/03/2013 15:54:30
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01568786
Message ID:
01568809
Views:
45
>>>Do you know how can I print that dictionary?
>>>
>>>Here is what I tried to test
>>>
>>>
>>> String s = @"<func>getqtyremaining</func><tcoperator>ADMIN</tcoperator><tcreturntype>XML</tcreturntype>
>>><tcsalespoint>TICKET004001</tcsalespoint><ttdatetime>03/11/2013 01:19 PM</ttdatetime>
>>><TCDCILIST><DCI>ACTIVITIESSKYDIVING 1000      </DCI><DCI>ACTIVITIESSKYDIVING 1030      </DCI>
>>><DCI>ACTIVITIESSKYDIVING 1100      </DCI><DCI>ACTIVITIESSKYDIVING 1130      </DCI><DCI>ACTIVITIESSKYDIVING 1200      </DCI>
>>><DCI>ACTIVITIESSKYDIVING 1230      </DCI><DCI>ACTIVITIESSKYDIVING 1300      </DCI><DCI>ACTIVITIESSKYDIVING 1330      </DCI>
>>><DCI>ACTIVITIESSKYDIVING 1400      </DCI><DCI>ACTIVITIESSKYDIVING 1430      </DCI></TCDCILIST>";
>>>
>>>        Dictionary<String, String> parameters = new Dictionary<String, String>(StringComparer.OrdinalIgnoreCase);
>>>        parameters.PopulateFromSQML(s);
>>>
>>>        foreach (KeyValuePair<string, string> val in parameters)
>>>        {
>>>            Console.WriteLine(val.Key, val.Value);
>>>        }
>>>        Console.ReadKey();
>>>
>>>I am not sure how to write this foreach.
>>>
>>>Thanks again.
>>
>>
>>Foreach seems ok
>
>Hmm, so I used the Console.WriteLine wrongly? It only prints key for me, not the value.
>

A question about the Console.WriteLine() ?

I think you're internet bullying me
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform