平时我们在VS里面格式化代码都是用Ctrl+K,D
现在我有一个字符串,怎么讲这个字符串格式化啊? using (StreamWriter sw = new StreamWriter("d:\\1.txt", false, Encoding.Default))
{
string s="using System;namespace MohuFramework.Entity{public class test
{private int _id;public int idget{ return id ;}set{ name = value; }";
sw.Write(s);
//请问怎样才能在输入s的时候按照VS的代码标准格式化??
}
现在我有一个字符串,怎么讲这个字符串格式化啊? using (StreamWriter sw = new StreamWriter("d:\\1.txt", false, Encoding.Default))
{
string s="using System;namespace MohuFramework.Entity{public class test
{private int _id;public int idget{ return id ;}set{ name = value; }";
sw.Write(s);
//请问怎样才能在输入s的时候按照VS的代码标准格式化??
}
可定制生成的格式.