阅读背景:

规定类中需要属性 - 编译时

来源:互联网 

Is there a way to stipulate that the clients of a class should specify a value for a set of properties in a class. For example (see below code), Can i stipulate that "EmploymentType" property in Employment class should be specified at compile time? I know i can use parametrized constructor and such. I am specifically looking for outputting a custom warning or error during compile time. Is that possible?Is there a way to stipulate that the clients of




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: