2021年10月26日

C# 使用枚举替代if else if

摘要: public enum LogLevel { Debug=0, Error=1, Fatal=2, Info=3, Warn=4 } switch (level) { case LogLevel.Debug: logInstance.Debug(message); break; case LogLe 阅读全文

posted @ 2021-10-26 09:53 写个笔记 阅读(233) 评论(0) 推荐(0) 编辑

导航