尝试使用一个名称来指示枚举用于什么,例如
public enum CountMethod
{
Row,
Column
}
Run Code Online (Sandbox Code Playgroud)
有一个叫共发现软件已经基本划分每个英文单词中的一个复杂的类层次结构,并已建立了它可以采取两个词并归还其最早的公共超(上位词WordNet中语言)的软件.
在这种情况下,查询单词red会返回类似的内容
red, redness
=> chromatic color, chromatic colour, spectral color, spectral colour
=> color, colour, coloring, colouring
=> visual property
=> property
=> attribute
=> abstraction, abstract entity
=> entity
Run Code Online (Sandbox Code Playgroud)
查询蓝色给出
blue, blueness
=> chromatic color, chromatic colour, spectral color, spectral colour
=> color, colour, coloring, colouring
=> visual property
=> property
=> attribute
=> abstraction, abstract entity
=> entity
Run Code Online (Sandbox Code Playgroud)
所以你知道,描述红色或蓝色的最准确方法是'彩色'
对于(行|列)我通常使用“IndexType”或类似的东西。正如我所看到的,行或列是同一数据结构中的两个不同索引。
我发现自己主要在编写基于表的数据结构时使用它,它可以让您通用地编写绝大多数代码,而不管您是在行还是列上操作,而只是在数据结构中进行一系列索引。然后,要执行特定于行或列的操作,您只需调用具有要使用的特定索引类型的通用操作。
如果它的范围限定在一个类中,那么效果最好
Table.IndexType or Grid.IndexType (etc.)
Run Code Online (Sandbox Code Playgroud)