Rasika <Rasika@discuss ions.microsoft. com> wrote:[color=blue]
> Memory usage wise is it a good idea to specify methods in utility/helper
> classes as instance methods rather than static methods?[/color]
Quite the opposite - it would mean you'd have to create an instance in
order to use the methods.
However, memory shouldn't usually be your prime concern. Think about it
in terms of object orientation - do these methods logically operate on
an instance? If so, they should probably be instance methods. If not,
they should probably be static methods. Helper classes almost always
just have static methods.
"Jon Skeet [C# MVP]" wrote:
[color=blue]
> Rasika <Rasika@discuss ions.microsoft. com> wrote:[color=green]
> > Memory usage wise is it a good idea to specify methods in utility/helper
> > classes as instance methods rather than static methods?[/color]
>
> Quite the opposite - it would mean you'd have to create an instance in
> order to use the methods.
>
> However, memory shouldn't usually be your prime concern. Think about it
> in terms of object orientation - do these methods logically operate on
> an instance? If so, they should probably be instance methods. If not,
> they should probably be static methods. Helper classes almost always
> just have static methods.
>
> --
> Jon Skeet - <skeet@pobox.co m>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too
>[/color]
Comment