![]() |
مقایسه تفاوت های Difference Between Namespace And Assembly
مقایسه تفاوت های Difference Between Namespace And Assembly Namespace vs Assembly In the .NET framework, assemblies come of different building blocks, and these form the key unit that is used for deployment, reuse, control security permissions, and activation scoping. An assembly, on the other hand, is a collection of types and resources which are built to function together and form a logical unit. Looking at an assembly, it is evident that it provides for the common language runtime with its information and with this it can be aware of its implementations. A type on the other hand does not exist to the runtime, especially outside the context of an assembly. A look at the namespace also reveals that there is a collection of classes, and this makes namespace an excellent choice that can be used in the logical organization of classes. This is a very powerful control feature that makes namespace very valuable to users. When looking at the .NET environment where there is namespace in reference to Visual Studio, the root namespace refers to what each class that is created in Visual Studio becomes part of. Namespace also takes over at the base for any sub-namespaces that occur and are automatically assigned when a class inside the project folder is created. It is also important to note the assembly name of the compiled file which the code is compiled to. In the default use of Visual Studio, there should be a default namespace created with the same name as the assembly name. It is however advisable to first think of what it is that you need prior to deciding on whether or not to follow by using the same name. It’s important to think of refactoring and renaming as this, if done without caution, can cause a lot of headache to users. This is especially the case when using source control. For the best results if different names are desired for the namespace and assembly name, the renaming of the entire project folders ought to be done first. An easy way to handle these emerging issues is to have a project name that is a descriptive name that represents the concepts of the project. The assembly name, on the other hand, should as much as possible try to factor in component distribution and the technology as well as the company name. The assembly should always contain namespaces, classes and data types as it is a small unit that functions for code development. It is important to note that assembly defines the name of the .dll file. As it is the unit that defines the .dll file, it is also the same file name that must be used in instances where there is need to avoid the .dll problem. Namespace has been shown to be an excellent item that prevents conflict when generating user defined classes. Summary
|
اکنون ساعت 07:20 AM برپایه ساعت جهانی (GMT - گرینویچ) +3.5 می باشد. |
Powered by vBulletin® Version 3.8.4 Copyright , Jelsoft Enterprices مدیریت توسط کورش نعلینی
استفاده از مطالب پی سی سیتی بدون ذکر منبع هم پیگرد قانونی ندارد!! (این دیگه به انصاف خودتونه !!)
(اگر مطلبی از شما در سایت ما بدون ذکر نامتان استفاده شده مارا خبر کنید تا آنرا اصلاح کنیم)