static void Main() { string s1 = Regex.Replace("abcdefghik", "e", match => "*I'm a callback*"); string s2 = Regex.Replace("abcdefghik", "c", Callback); } static string Callback(Match match) { return "*and so am i*"; }
But I don't want to create a new solution just for that smallish code. .NET fiddle to the rescue!
Example: http://dotnetfiddle.net/FSqLmM
And what's cooler with .NET Fiddle, is that it has auto-complete, unlike ideone
If only I can try snippets of NHibernate, Entity Framework,
Happy Coding! ツ
No comments:
Post a Comment