public static readonly
fields are a little unusual;
(public static readonly
字段有点不寻常;)
public static
properties (with only a get
) would be more common (perhaps backed by a private static readonly
field). (public static
属性(只有get
)会更常见(可能由private static readonly
字段支持)。)
const
values are burned directly into the call-site;
(const
值直接刻录到调用站点中;)
this is double edged: (这是双刃的:)
If the value will never change, then const is fine - Zero
etc make reasonable consts ;p Other than that, static
properties are more common.
(如果该值永远不变,则const很好- Zero
等可以使const变得合理; p除此之外, static
属性更为常见。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…