What is allowed in Visual Basic that's prohibited in C# (or vice versa)?

后端 未结 21 1858
渐次进展
渐次进展 2020-12-05 06:07

This is code-related as in what the compiler will allow you to do in one language, but not allow you to do in another language (e.g. optional parameters in

21条回答
  •  隐瞒了意图╮
    2020-12-05 06:31

    VB.NET has support for CIL Exception Filters, C# doesn't:

    Try 
      ...
    Catch ex As SomeException When ex.SomeProperty = 1
      ...
    End Try 
    

提交回复
热议问题