【发布时间】:2011-04-11 18:02:24
【问题描述】:
System.Windows.Forms 中的标准枚举:
[Flags]
public enum DragDropEffects
{
Scroll = -2147483648,
//
// Summary:
// The combination of the System.Windows.DragDropEffects.Copy, System.Windows.Forms.DragDropEffects.Link,
// System.Windows.Forms.DragDropEffects.Move, and System.Windows.Forms.DragDropEffects.Scroll
// effects.
All = -2147483645,
None = 0,
Copy = 1,
Move = 2,
Link = 4,
}
Scroll 的值很奇怪,你不觉得吗?
据我了解,这些值都来自"the old times" of COM\OLE DROPEFFECT...但是为什么首先选择它们呢?作者是否尝试保留 8 和 0x80000000 之间的间隔?它是否有用,或者它背后是否有一个有趣的故事,或者它只是 YAGNI 原则的另一个长期例证?
【问题讨论】: