.net - Best practice for structuring/grouping a collection of string constant in VB.NET? -
i wau organize , group collection of strings in same way enum. name used in code , value. since enums can created integrals, this:
**public structure somestrings public shared readonly property something1 string return "something1" end end property public shared readonly property something2 color return "something2" end end property end structure**
is there better way it?
is there better way?
yes, use shared readonly
fields instead of properties. can proper ide auto-completion real enums using undocumented xml doc tag:
''' <completionlist cref="somestrings"/> public structure somestrings public shared readonly something1 string = "something1" ' etc. end structure
for more details, refer previous answer explaining feature.
Comments
Post a Comment