有时候图省事,属性这样写public int pageCount{get{return pageCount;}set{pageCount=value;}}可能会报栈溢出的错误,

StackOverflowException: The requested operation caused a stack overflow.

需要保存值时还是要写到字段里,属性无法保存,如下写法:

private int pageCount;
public int PageCount{get{return pageCount;}set{pageCount=value;}}

相关文章:

  • 2021-11-14
  • 2022-12-23
  • 2021-08-21
  • 2021-12-03
  • 2022-12-23
  • 2021-12-28
  • 2021-11-21
猜你喜欢
  • 2021-11-19
  • 2021-08-19
  • 2021-12-22
  • 2021-12-10
  • 2021-05-25
  • 2021-11-17
相关资源
相似解决方案