pre-defined constants for non-trivial data types

后端 未结 4 1793
梦如初夏
梦如初夏 2021-01-06 18:29

My Goal: Create a C# class for predefined errors that have both an ID and a Message. Here was what I tried:

public class MyError
{
    public static readonly         


        
4条回答
  •  没有蜡笔的小新
    2021-01-06 19:10

    Your properties should not be static because every instance of this class will have their own ID and Message, do you agree?

提交回复
热议问题