开发者

Standard .NET side enum

开发者 https://www.devze.com 2023-03-19 20:27 出处:网络
I often use enums like public enum Side { Left, Top, Right, Bottom }; or public enum Direction { Left, Up, Right, Down };

I often use enums like

public enum Side { Left, Top, Right, Bottom };

or

public enum Direction { Left, Up, Right, Down };

Every time I describe the enum a开发者_开发百科gain. Is there a standard enum of this kind in .NET?


Not quite the same, but I know of the System.Windows.Forms.AnchorStyles enumeration.

http://msdn.microsoft.com/en-us/library/system.windows.forms.anchorstyles.aspx

Otherwise, I'd say not - add it to your own common library. You also have to consider the cost of taking dependencies (even on .NET Framework stuff), because of things like portability. I wouldn't take one on WinForms unless you are already depending on WinForms.


Old and answered, but there is a ArrowDirection enum. See https://msdn.microsoft.com/en-us/library/system.windows.forms.arrowdirection(v=vs.110).aspx. Unfortunately, it is in System.Windows.Forms.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号