inline-code

Eval inline ruby inside a markdown document

I need to call some helpers from a Markdown view. Is this somehow a good practice and is generally supported on popular ruby-based Markdown parsers? ...

Any suggest to store a value in a lambda expression

Hi, I'm trying to write an in-line function for count occurrences of a word in a string using lambda expressions recursively. The function: Func<string, string, int> getOccurrences = null; getOccurrences = (text, searchTerm) => text.IndexOf(searchTerm, StringComparison.OrdinalIgnoreCase) == -1 ? 0 : getOccurrences( text.Su...

Is it bad practice to write inline event handlers

Is it bad practice to write inline event handlers ? For me, I prefer use it when I want to use a local variable in the event handler like the following: I prefer this: // This is just a sample private void Foo() { Timer timer = new Timer() { Interval = 1000 }; int counter = 0; // counter has just this mission timer.Tick +=...