Should enumerators be placed in a separate file or within another class?

Posted by Icono123 on Stack Overflow See other posts from Stack Overflow or by Icono123
Published on 2010-03-17T16:02:30Z Indexed on 2010/03/17 16:11 UTC
Read the original article Hit count: 182

Filed under:
|
|

I currently have a class file with the following enumerator:

using System;

namespace Helper
{
    public enum ProcessType
    {
        Word = 0,
        Adobe = 1,
    }
}

Or should I include the enumerator in the class where it's being used?

I noticed Microsoft creates a new class file for DockStyle:

using System;
using System.ComponentModel;
using System.Drawing.Design;

namespace System.Windows.Forms
{
    public enum DockStyle
    {
        None = 0, 
        Top = 1,
        Bottom = 2,
        Left = 3,
        Right = 4,.
        Fill = 5,
    }
}

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET