As question Useful Eclipse Java Code Templates suggest some live templates for java, I start to think about some possibilities in C#
ReSharper has Live Templates:
ReSharper -> Live Templates
e.g. (my unique until now)
tt is expanded to:
[Test]
public void Test(){}
But, out of this scope some other idea. Or about Predefined Templates, exists someone that rocks?
Here are some I love:
// $type$: $END$ ($user$ on $time$)comfor comment$type$:TODOis default; first editable$user$: evaluated to current user name$time$: evaluated to current date/timeprivate readonly Logger _logger = LogManager.GetCurrentClassLogger();logfor loggerSystem.Diagnostics.Debug.Assert($condition$, "$condition$");asfor assertionasrttemplate, because it automatically prints out the condition to the assertion dialogSystem.Diagnostics.Debug.Assert($condition$, "$condition$", "$END$");asdfor assertion detailBut, always try to ask yourself, what do you type most. Most valuable live templates will differ from domain to domain.
Apart from that, I really like your
tttemplate. I just added it to my templates 🙂 Also I started a new file template that creates the whole default skeleton of a test class.