1

I have an enum as below:

public enum DatabaseCommand
{
     [Category("Connection")]
     Connected= 0,
     [Category("Connection")]
     Disconnected,
     [Category("Connection")]
     GetConnectionStatus,
     [Category("Execute")]
     ExecuteSQLString,
     [Category("Execute")]
     ExecuteSQLStoreProcedure,
     CustomCommand,
}

So, how can I list all of Category Attribute by passing typeof(DatabaseCommand) and return a array of string as below:

"Connection" , "Execute" and "".

Any help? Thank you!!!

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.