This did not serve it's intended purpose
The Weird and The Wonderful
5
Posts
5
Posters
0
Views
1
Watching
-
private string Format(string data, Dictionary properties) { foreach (string key in properties.Keys) { data = data.Replace(key, data); } return data; }
.
Unless it's purpose was to waste time and memory? :laugh:
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
private string Format(string data, Dictionary properties) { foreach (string key in properties.Keys) { data = data.Replace(key, data); } return data; }
.
It compiles. Ship it!
-
private string Format(string data, Dictionary properties) { foreach (string key in properties.Keys) { data = data.Replace(key, data); } return data; }
.
As a bug addict[^], I see this type a lot!
-
private string Format(string data, Dictionary properties) { foreach (string key in properties.Keys) { data = data.Replace(key, data); } return data; }
.
Would have been better as an extension method.
Don't comment your code - it was hard to write, it should be hard to read!