Starting with Java, I got used to the package structure (com.domain.appname.tier) Now I started working on a C # project, where all projects have a depth of 1:i.e. ProjectA - Utilities.cs - Validation.cs -.... - Extraction.cs
and all cs files about 2500 lines long ...
How do you organize your classes and namespaces in C # so that it makes sense and keeps the original file in a logical size?
Just like I assume you are doing in Java:
, , .
Java :) #, VB, looooong .
Microsoft :
, :
, . FxCop ( Code Analysis, ) , .
, , , .
, , Resharper , VS, , .
( ) .
, CompanyName.ProjectName . WF4 .
VS , . , "Foo" ,
"CompanyName.ProjectName.Activities.Designers"
Visual studio , . , , , . , .
, Java.
Java . , IIRC. # , , .
Speaking of namespaces in C #, they do not follow the com.domain.appname.tier convention, but use the Company.Product.Tier format.
How to reorganize large classes depends on the application. This exercise applies OOP recommendations and applies to both Java and C #.
If you are deeply involved in the project, I recommend spending some time redesigning the structure as you used in java, considering that packages are equivalent to namespaces in C #.
Source: https://habr.com/ru/post/1761511/More articles:How to automatically check whether offline mode works in a web application - html5h: selectOneRadio containing images - javaUse image to select radio button in selectOneRadio elements - zurb-foundationRails Email Client - ruby-on-railsdjango increases idle timeout - djangoSMS gateway SMSC / ESME TON / NPI - smsEnlarge Visual Studio 2005 - visual-studioGetting an Apple ID (or some kind of account ID) in Objective-C - objective-cConvert EXR Image Sequence to .MOV - image-processingOnBlur event overrides jQuery UI events - javascriptAll Articles