VB.NET equivalent for C# 7 Type pattern matching

前端 未结 2 656
甜味超标
甜味超标 2021-01-17 09:37

Is there a VB.NET equivalent to this? Note in particular the bmp in the code sample.

public void MyMethod(Object obj)
{
    if (obj is          


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-17 10:20

    Currently, no. If you want to implement this, you'll have to use some of the longer formats you already mention in your question.

    The C# and VB languages don't always have equivalent features.

提交回复
热议问题