Namespaces and subnamespaces in C#

前端 未结 8 1001
鱼传尺愫
鱼传尺愫 2021-01-19 07:23

begginers question about C#.

In every program I have to include several namespaces, like:

using System;
using System.Collections.Generic;
using Syste         


        
8条回答
  •  天涯浪人
    2021-01-19 07:33

    System and System.IO namespaces are different.

    You can treat "subnamespace" as parent-child relationship in the object model. If you have access to the "Car" object does not mean that you have access to car's wheels.

    System is a huge namespace that contains hundreds of nested namespace and thousands of classes. You should specify all nested namespaces separately to state what part of the module are you interested in.

提交回复
热议问题