c# - Visual Studio 中字符串的快捷方式

标签 c# .net visual-studio-2010 visual-studio code-snippets

在使用 Visual Studio 控制台应用程序时,我经常使用以下代码行:

Console.WriteLine("press [enter] to exit");

有没有一种方法可以在 Visual Studio 中设置快捷键,这样我就不需要每次都输入这个快捷键?

可能出于某种原因,我经常使用其他代码行,快捷方式功能会有所帮助。

最佳答案

你可以给自己定义一个 code snippet . Creating Our Own Snippets Using Visual Studio 2010这是一篇很酷的文章。

对于Console.Writeline()方法,写cw然后按两次Tab

enter image description here

关于c# - Visual Studio 中字符串的快捷方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13776647/

相关文章:

c# - 从数据库模型填充 View 模型但出现对象引用错误

c# - WCF:读取 XML 数据时已超出最大数组长度配额 (16384)

c# - 为什么我会收到此消息 : Cannot convert type 'bool' to 'string'

c# - 超时缓存信息

c++如何在编译时创建我自己的警告

visual-studio-2010 - 没有Visual Studio的Microsoft代码契约(Contract)

c# - 指定的转换对字段 int 无效

c# - 如何使用 SqlConnectionStringBuilder 从连接字符串中获取数据库名称

c# - wpf(离线)应用程序 c# 的更新问题

时间:2019-03-17 标签:c#System.InvalidOperationException: This OracleTransaction has completed; it is no longer usable