I am trying to replace a text in a string with Dictionary Value , if it is matched with the Dictionary Key. Select * from Table1 where column1 ={Value1} and Column2 = {value2}.
mydict.Add({value1},OriginalValue1);
mydict.Add({value2},OriginalValue2);
I can Iterate through the dictionary keys and replace the text in the string like ,But this is going to effect the performance if there are more than 100 items in the Dictionary object.
foreach(string key in mydict.keys)
{
if(Query.Contains(key)
{
//Replace the string
}
Is there a way to achieve this with least effect to the Performance?
Dictionaryclass is FAST.