Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where to put extension methods?
Message
De
12/09/2012 12:58:18
 
 
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:
01552784
Vues:
37
This message has been marked as a message which has helped to the initial question of the thread.
>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 it wherever you like. The only constraint it that the assembly which contains it must be referenced whereever you use that extension method. If you want it to be fairly globally used then I'd suggest a seperate assembly ('Utilities', 'Global Extensions' ?)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform