Possible Duplicate:
Advantages to Using Private Static Methods
In a project that i'm currently working on I found a private static class definition. It was part of a baseclass that derived from Page. The class contains some public static methods which are used in some baseclass methods.
As the original developer of this piece of code is gone, I wonder what the benefit is. The methods only return enum values.
example:
public class BasePage : Page
{
protected override OnInit(EventArgs e)
{
...
}
private static class SomeClass
{
public static myenumtype GetCategory(int id)
{
switch(id)
{
case 1: return myenumtype.one;
case 2: return myenumtype.two;
default: return myenumtype.zero;
}
}
}
}