json Visual Studio代码用户代码段

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json Visual Studio代码用户代码段相关的知识,希望对你有一定的参考价值。

{
	// Place your snippets for csharp here. Each snippet is defined under a snippet name and has a prefix, body and 
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	// "Print to console": {
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }

	"Public Method": {
		"prefix": "method_public",
		"body": [
			"public void ${1:methodName}()",
			"{",
			"\t$0",
			"}"
		],
		"description": "Public method"
	},
	"Private Method": {
		"prefix": "method_private",
		"body": [
			"void ${1:methodName}()",
			"{",
			"\t$0",
			"}"
		],
		"description": "Private method"
	},
	"Debug Log String": {
		"prefix": "debug_log_string",
		"body": [
			"Debug.Log(\"${1:string}\");",
		],
		"description": "Debug.Log() string to console"
	},

	"Debug Log Variable": {
		"prefix": "debug_log_variable",
		"body": [
			"Debug.Log(${1:variable});",
		],
		"description": "Debug.Log() variable to console"
	},
}

以上是关于json Visual Studio代码用户代码段的主要内容,如果未能解决你的问题,请参考以下文章

json 用于Visual Studio代码的AsciiDoc代码段

json HTML 5和bootstrap 4 visual studio代码段

json Visual Studio代码的PowerShell代码段文件 - 放在〜\AppData \Roaming\Code \User \Snippets目录中

json Visual Studio代码 - 用户设置

Visual Studio Code的用户代码段在最新更新后停止工作

在 Visual Studio Code (VS Code) 中将一段代码注释掉的两种方法