I recently started using features to make it easier to put fingers, for example, I had something like this
((Dictionary<string,string>)value).Add(foo);
and converted it to a tiny helper function so that I can do it
ToDictionary(value).Add(foo);
Is it against coding standards?
Also, what about simple examples? For example, in my scripting engine, I thought of doing something like this
((StringVariable)arg).Value="foo";
to be
ToStringVar(arg).Value="foo";
I just don’t like how to assign a value in order and instantly get a property, you have to enclose it in double brackets. I feel that the latter is much worse than the first, although
Earlz source
share