我有所有这些都可以工作的代码块,但我想压缩它们只是为了看起来更好。有任何想法吗?
public static AccountEnum Direct()
{
const AccountEnum direct = AccountEnum .DIRECT;
return direct;
}
public static AccountEnum Partner()
{
const AccountEnum partner = AccountEnum .PARTNER;
return partner;
}
public static AccountEnum Resold()
{
const AccountEnum resold = AccountEnum .RESOLD;
return resold;
}
public static AccountEnum Referral()
{
const AccountEnum referral = AccountEnum .REFERRAL;
return referral;
}