lundi 4 avril 2016

Get all ENUM objects in project

I have some enum objects at anywhere in my project. They are in same feature. How can I find all enum objects with filter. I don't sure about the filter, but I think we can add an attribute for Enum object and filter type base on the attribute.

For example, I have 2 enum objects in 2 class:

public class FirstClass
{
    [HelloWord]
    public enum FirstEnum
    {
        View = 1,
        Edit = 2
    }
}

public class SecondClass
{
    [HelloWord]
    public enum SecondEnum
    {
        Good,
        Bad
    }
}

So, I want to list all enum object in project that contain attribute [HelloWorld]. How can I do that?





Aucun commentaire:

Enregistrer un commentaire