Why should I always make my Exceptions [serializable]? (.NET)

前端 未结 4 2012
再見小時候
再見小時候 2020-11-27 04:58

Referring to What is the correct way to make a custom .NET Exception serializable?
and Are all .NET Exceptions serializable? ...

Why should my exceptio

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 05:43

    In addition to Talljoe's answer, your exceptions may be passed across Web Services as well, in this case the exception needs to be serializable/deserializable so it can be turned into XML and transmitted by the Web Service

提交回复
热议问题