System.StackOverflowException , when get set Properties are used?

前端 未结 3 2018
半阙折子戏
半阙折子戏 2021-01-01 19:45

An unhandled exception of type \'System.StackOverflowException\' occurred in wcfserviceLibrary.DLL

the code is show as follows.

[DataContract]
public         


        
3条回答
  •  独厮守ぢ
    2021-01-01 20:27

    declare private variables for both : _desigId, _designationName. You are in a recursive-loop that will go on infinitely. return the private variables, rather than the properties.

提交回复
热议问题