Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put extension methods?
Message
 
 
À
12/09/2012 12:54:20
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01552781
Message ID:
01552785
Vues:
28
>>Hi everybody,
>>
>>I have a solution consisting of multiple projects. I found this extension method for the string proper case
>>
>>http://www.extensionmethod.net/Details.aspx?ID=101
>>
>>(I also read Rick Strahl implementation where the same method was discussed and then lots of interesting comments followed).
>>
>>My question is - where should I create such extension methods? In which project and hierarchy and what is the good name for such methods and should I place them all in one file?
>>
>>Right now I have
>>
>>Objects
>>Data
>>ConsoleApp (this is for testing only)
>>Main Web project
>>
>>in my solution.
>>
>>I want these extension methods to be re-usable in other projects also.
>>
>>Thanks in advance.
>
>
>Put extension methods in a separate namespace
>
>>I want these extension methods to be re-usable in other projects also.
>
>I suppose you have a common project that is used in all solutions ? If yes, put them there in a separate namespace

Not yet. I think I need to discuss this with my colleagues before I'll proceed. But just for the reference, can you tell me how you have such things organized? Say, do you create a class library project in some common directory and have
StringExtensions
MathExtensions (for example)

or just to give me an idea.

Thanks again.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform