gpt4 book ai didi

c# - 在 Visual Studio 2012 中拥有双标签模板

转载 作者:行者123 更新时间:2023-12-04 05:08:35 25 4
gpt4 key购买 nike

所以在 Visual Studio 中有一个技巧,当你输入,例如“for”,然后双击 Tab 键时,Visual Studio 会创建

for (int i = 0; i < length; i++)
{

}

有没有办法创建我自己的模板?因为我不使用 LINQ,所以我想在输入 'db.A_' 时使
db.A_TableName.Where(k => k.Field == Value).Select(k =>
new
{
Name = k.Field
});

最佳答案

您可能指的是 code snippets .文档解释了如何创建新的片段和 how to add them .根据可以在文件夹 C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC#\Snippets\1033\Visual C# 中找到的现有片段创建新片段可能是最简单的。 (取决于您的 VS 版本和操作系统)。

关于c# - 在 Visual Studio 2012 中拥有双标签模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15186658/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com