Does an Enum exist for Asc or Desc ordering?

前端 未结 5 633
后悔当初
后悔当初 2021-02-03 17:53

Is there an Enum natively in .NET for asceding or Desceding ordering?

I need to use the ordering concept in different libraries, and I want loose coupling as possible.

5条回答
  •  爱一瞬间的悲伤
    2021-02-03 18:40

    There are two that I know of: SortDirection and SortOrder

    One quick caveat is that those are found in the System.Web.UI.WebControls and System.Windows.Forms namespaces, respectively, so there's the possibility that they might not apply for what you're doing semantically.

提交回复
热议问题