If all you need is a state machine, a dictionary works rather nicely.
Dictionary<string,stringeven better, as you end up typing the objects for
key and value.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
Subscribe to my blog
http://feeds.feedburner.com/GregoryBeamer#
or just read it:
http://feeds.feedburner.com/GregoryBeamer
********************************************
| Think outside the box! |
********************************************
"raulavi" <ra*****@discussions.microsoft.comwrote in message
news:C6**********************************@microsof t.com...
c# vs2008
HI:
I have to replace a string with somevalue, I use the case
any Ideas how to better implement this (avoid regex if possible).
(was thinking of a dictionary?)
thanks
case "a"
myvar = "1a"
break
case "w"
myvar = "bb"
break
case "L"
myvar = "po"
break