Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Comparing Data Row column values and string values
Message
From
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:
01578111
Views:
39
>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.
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform