當定義好之後就可以在主程式中打 ContentTypeEnum. 就會跳出建議選單。
using System;
namespace CSharp_Test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(ContentTypeEnum.Json);
Console.ReadKey();
}
}
public static class ContentTypeEnum
{
public static String X_WWW_Form_Urlencoded { get { return "application/x-www-form-urlencoded"; } }
public static String Json { get { return "application/json"; } }
}
}