C# 代码优化:使用 TryGetValue 获取字典值
else if (strPN == 'NFL-IR-500-17-FH') { if (NFL_IR_500_17_FH.TryGetValue(mode, out object value)) { width = value.ToString(); return null; } else { width = ''; return null; } }
原文地址: https://www.cveoy.top/t/topic/mJeR 著作权归作者所有。请勿转载和采集!