C# explicitly defining what exceptions are thrown

前端 未结 6 589
礼貌的吻别
礼貌的吻别 2020-12-03 09:55

In Java, you explicitly define what exceptions are thrown using the \"throws\" keyword. That way, anyone calling your method knows what to catch.

Is there something

6条回答
  •  孤街浪徒
    2020-12-03 10:35

    C# does not support this. (Not that I know anyway). What you can do is use Xml Comments so that while calling you methods this data will be shown by intellisense.

提交回复
热议问题