Namespace references in C# vs. VB.Net

后端 未结 3 1522
轮回少年
轮回少年 2021-01-04 21:55

In VB.Net you can do something like the following without any issues... just ignore the fact that this is a pretty useless class :-)


Imports System

Public          


        
3条回答
  •  失恋的感觉
    2021-01-04 22:33

    This is because VB.Net supports partial namespaces; C# does not.

    With Visual Basic, System is imported by default and child namespaces are automatically resolved.

    Read more in this article.

    VB.Net vs C#, Round 2: Partial Namespaces

提交回复
热议问题