C # Code Organization: project over folder

Source: Internet
Author: User

Use Project (*. csproj) in the. NET/C # project to organizeCodeIt has several advantages over organizing folders in the same project:

  1. From the perspective of the customer code, I rely on a few things from you, you can only rely on this things (made into a separate project), do not need to rely on other irrelevant code
  2. From the perspective of access control and visibility, the internal keyword of C # is for the physical module, that is, the DLL, rather than the namespace or folder.
  3. To avoid bidirectional dependency, Visual Studio blocks bidirectional dependencies between two projects, but does not block dependencies between different folders or namespaces in the same project.
  4. From the deployment perspective, the deployment unit is DLL. If you need separate deployment and flexible deployment, the DLL should be a single cohesive function module, the folder or namespace is not physically matched after compilation

Do you have other considerations? How do I feel that. Net/C # does not support code design and deployment?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.