Ad,
Namespaces are not required or as Herfried suggests you can have an unnamed
namespace. As namespaces are simply an organization feature to avoid name
collisions.
In other words in both C# & VB.NET you can leave the root/default namespace
blank, and not to include a namespace statement in the source files. In both
cases you will have an unnamed namespace in the generated assembly.
>> While C# normally leaves the Root namespace property blank under the
> Project
>> Properties dialog.
Doh! Technically C# uses a "Default namespace" that is used when adding new
types. Changing this default namespace does not change existing types.
Hope this helps
Jay
"ad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thank!
> But, Why the vb project still can compile after I delete the root
> namespace
> in the project properties dialog,
> and I did not add namepace in the codes, so that there are no namespace in
> my vb projec?
>
>
> "Jay B. Harlow [MVP - Outlook]" <(E-Mail Removed)> 撰寫於郵件新聞
> :(E-Mail Removed)...
>> Ad,
>> > Is there any difference about namespace between VB.NET and C#.
>> No! As namespace is a CLR construct used to groups types.
>>
>> > Why I can't find namespace in the files .vb .
>> VB.NET projects normally set the Root namespace property under the
>> Project
>> Properties dialog.
>>
>> While C# normally leaves the Root namespace property blank under the
> Project
>> Properties dialog.
>>
>> Hope this helps
>> Jay
>>
>> "ad" <(E-Mail Removed)> wrote in message
>> news:%23$(E-Mail Removed)...
>> > Is there any difference about namespace between VB.NET and C#.
>> >
>> >
>> >
>> > All functions in c# must include in a namespace.
>> >
>> > Why I can't find namespace in the files .vb .
>> >
>> > How VB.NET implement the concept of namespace
>> >
>> >
>>
>>
>
>
|