In C#, it's common to have to type {0}
, {1}
, etc. when formatting strings with string.Format()
or Console.WriteLine()
. Considering its frequency, it's an awkward set of key strokes. But despite my searches, I couldn't find any sort of shorthand or hotkey to automatically insert it in Visual Studio. Has anyone figured out something to expedite the process?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
One of the benefits from string interpolation in C#6.0, which I find helps.
Instead of:
You can do:
See a guide: http://www.informit.com/articles/article.aspx?p=2422807
You can create the following command (C#) with my Visual Commander extension to insert text and then assign a keyboard shortcut to it: