提交 c9f2fe86 编写于 作者: C CyrusNajmabadi

Simplify code.

上级 5e8c4977
......@@ -59,16 +59,7 @@ static WellKnownSynchronizationKindExtensions()
{
var fields = typeof(WellKnownSynchronizationKind).GetTypeInfo().DeclaredFields.Where(f => f.IsStatic);
var maxValue = 0;
foreach (var field in fields)
{
var value = (int)field.GetValue(null);
if (value > maxValue)
{
maxValue = value;
}
}
var maxValue = fields.Max(f => (int)f.GetValue(null));
s_strings = new string[maxValue + 1];
foreach (var field in fields)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册