Define enums within a method in C#?

前端 未结 5 1987
囚心锁ツ
囚心锁ツ 2020-12-18 17:50

I have mainly a C++ background and I am learning C#. So, I need some help with C# idioms and style.

I am trying to write, in C#, a small text-file parsing method i

5条回答
  •  醉话见心
    2020-12-18 18:30

    I would also favour the Enum approach. Plus, although that is not the case here, it has advantages over the CONSTS when you want to combine them as flags, since you have a method to easily test for that.

提交回复
热议问题