|
C#程式碼美化效果演示 |
|
|
|
|
|
SourceFormatX 使用強大的C#詞法解析引擎全面地分析您的程式碼並根據用戶自定義的C#語言程式碼風格重構和美化C#程式碼檔案,因此它能精細地根據不同的程式碼風格美化多種程式碼,甚至是下面這些極度混亂的程式碼:
|
C#程式碼美化範例:
範例1
|
範例2
|
範例3
|
範例4
此 C# 程式碼美化的範例是為了展示 SourceFormatX C# 程式碼美化工具 詞法解析引擎的威力。這份混亂到無法閱讀的C#程式碼檔案在瞬間即被 SourceFormatX 美化和縮排成整潔且可讀性強的美觀風格樣式。
namespace Tekdev.Cryptography{using System;using System.Text;using System.IO;
internal class RSAUtilties{internal static void WriteKeyFile(string expression,
string keyLocation){using(FileStream fs=new FileStream(keyLocation,
FileMode.Create)){StreamWriter writer=new StreamWriter(fs);writer.Write(
expression);writer.Close();}return;}internal static string ReadKeyFile(string
keyLocation){string keyValue=string.Empty;using(FileStream keyStream=File.Open(
keyLocation,FileMode.Open)){StreamReader reader=new StreamReader(keyStream);
keyValue=reader.ReadToEnd();reader.Close();}return keyValue;}}}
namespace Tekdev.Cryptography {
using System;
using System.Text;
using System.IO;
internal class RSAUtilties {
internal static void WriteKeyFile(string expression, string keyLocation) {
using(FileStream fs = new FileStream(keyLocation, FileMode.Create)) {
StreamWriter writer = new StreamWriter(fs);
writer.Write(expression);
writer.Close();
}
return ;
}
internal static string ReadKeyFile(string keyLocation) {
string keyValue = string.Empty;
using(FileStream keyStream = File.Open(keyLocation, FileMode.Open)) {
StreamReader reader = new StreamReader(keyStream);
keyValue = reader.ReadToEnd();
reader.Close();
}
return keyValue;
}
}
}
範例1
|
範例2
|
範例3
|
範例4
|