Is it better to use static functions if class members are not needed?

I have a member function that is independent of any member variables of the class. (in my case, the class is an ASP.Net page)

The function is protected, I do not need it outside this class. Its sole purpose is to create a URL from this object.

Should I make all my functions static if they are not dependent on the class, even if they are not used outside this class? Is there any reason, such as performance or maintainability?

+5
source share
6 answers

, . , . .

+5

, .

, - . , ? ? , , , ?

+6
+5

, , , , . , , , , , , . , , ( ).

+1

static, . . , , .

, , - . , .net. !

+1

. - , . , , . , (, ), , .

0

All Articles