You should create a "helper" class with static methods. Good practice is to
name all these classes XxxHelper, for example MyStringHelper ... Helper
classes should only contain static methods and should never be instanciated,
so it is a good idea to add a private constructor (and no other
constructor), so that you get a compile error if you try to instanciate it
by mistake.
Bruno.
"Gee" <so*****@microsoft.com> a écrit dans le message de
news:eL**************@TK2MSFTNGP09.phx.gbl...
I'm new to csharp and in other languages I used I have had a standard set
of useful function like QuoteString DeQuoteString which are used all over the
place. Creating a class everything I want to use it seems like lots of
extra typing.
The options I see are (Some may not be possible)
1. Create a class inherited from string and use that for my strings,
2. Use Static methods
3. Create a class every time