How to obtain a list of constants in a class and their values

前端 未结 2 777
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-16 03:46

I have a class in VB with some constants that represent the string name of my security roles. I need to be able to call a function to return to me a string array(or collect

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-16 04:50

    You can build an object that is nearly identical to a string enum in VB.Net. See my previous post on the topic here:

    Getting static field values of a type using reflection

提交回复
热议问题