Can I create an automatic property (no private member) with get and set code?

前端 未结 4 537
后悔当初
后悔当初 2021-01-24 02:14

In c#, I can do this:

public int Foo { get; set; }

Which is nice. But as soon as I want to do anything in the getter or setter, I have to chang

4条回答
  •  隐瞒了意图╮
    2021-01-24 02:32

    The short answer? No. The long answer? Sorry, still no. :) I feel your pain man, but that's the way it is.

提交回复
热议问题