namespace ThisClass
{
public enum EThisC
{
ET_A,
ET_B,
ET_C
}
/// 輔助類
public static class EThisCFunc
{
public static string ToMyString(this EThisC et)
{
switch(et)
{
case EThisC.ET_A:
return "ET_AAAAA";
case EThisC.ET_B:
return "ET_BBBB";
default:
return "ET_NNNN";
}
}
}
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine(EThisC.ET_A.ToMyString());
System.Console.ReadKey();
}
}
This CSharp 輔助用法
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.