Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Limit to #region nesting?
Message
De
13/09/2011 00:05:06
 
 
À
12/09/2011 12:35:53
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01523118
Message ID:
01523364
Vues:
27
Good point about the refactoring

What would be your take (gustibus) with

- large array initializations

- nested classes

__


>Yes, C sharp has partial class files but I do not use them for general classes. I do not like looking in partial classes to find the code, I like it organized in a single code file for a class. However, I also keep my code limited in a class to what the class should be responsible for and refactor out any base code, etc. I do not have classes that contain thousands of lines of code. I use regions only to collapse specific areas like Viv mentioned that allows me to scroll much easier when needed or to just view some methods or ??.
>
>Thanks
>
>>Tim,
>>
>>I sometimes use several files to split
>>
>>>In my opinion the #region is goog organization of code and I use much the same as Viv. Using ReSharper helps navigate code but sometimes for instance if I have many properties in a class, collapsing the region around the properties makes the file more manageable to wonder through. I don't view it as hiding code, but rather just part of organizing.
>>>Just another view point.
>>>Timothy
>>>
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform