Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing Data Row column values and string values
Message
 
 
To
10/07/2013 11:49:17
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
Application:
Web
Miscellaneous
Thread ID:
01578028
Message ID:
01578113
Views:
36
>>BTW, I re-checked that method (you helped with it a while ago) and it doesn't trim
>
>
>Then I would make it trim
>>
>>
>>/*========================================================================================
>>       *                Dictionary<String, String> ToSQML
>>       *=======================================================================================*/
>>      /// <summary>
>>      /// Populates a <string, string> dictionary using a SQML string.    
>>      /// </summary>
>>      /// <param name="tDictionary"></param>
>>      /// <param name="tcSQML"></param>
>>      public static void PopulateFromSQML(this Dictionary<String, String> tDictionary, String tcSQML)
>>      {
>>         tDictionary.Clear();
>>
>>         String pattern = @"<(?<field>[^/>]+)>(?<data>.*)</\k<field>>";
>>
>>         MatchCollection matches = Regex.Matches(tcSQML, pattern, RegexOptions.Singleline);
>>         foreach (Match m in matches)
>>         {
>>            if (!tDictionary.ContainsKey(m.Groups["field"].ToString()))
>>               tDictionary.Add(m.Groups["field"].ToString(), m.Groups["data"].ToString());
>>         }
>>      }
>>
>>So, we can keep trim.

Ok, I'll add this, but that's not the main question.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform