我正在尝试为水平对齐测试以下类型的值:
public enum DataGridViewContentAlignment
{
NotSet = 0,
TopLeft = 1,
TopCenter = 2,
TopRight = 4,
MiddleLeft = 16,
MiddleCenter = 32,
MiddleRight = 64,
BottomLeft = 256,
BottomCenter = 512,
BottomRight = 1024,
}
例如,如果Aligneent是XXXLeft,我想编写一个返回true的测试。是否有一种紧凑的方式来编写它而不是三个或从句?