{"id":67,"date":"2019-06-07T18:55:01","date_gmt":"2019-06-07T18:55:01","guid":{"rendered":"https:\/\/www.great-white-software.com\/blog\/?p=67"},"modified":"2019-06-21T00:55:42","modified_gmt":"2019-06-21T00:55:42","slug":"handy-tip-for-enums","status":"publish","type":"post","link":"https:\/\/www.great-white-software.com\/blog\/2019\/06\/07\/handy-tip-for-enums\/","title":{"rendered":"Handy tip for Enums"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Ever tried to copy an enum from some outside source like Apple, MSDN, etc and wanted to retain the comments they have about each value in the enumeration ?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can !<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enum values can have comments in them like<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Public Enum ConnectionOption\n adConnectUnspecified = -1 \/\/    Default. Opens the connection synchronously (after).\n adAsyncConnect    = 16 \/\/ Opens the connection asynchronously (before).\n End Enum\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Simply edit each value in the enum and make sure you put one of the valid comment markers in the value line and you can have commented enums.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enjoy !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever tried to copy an enum from some outside source like Apple, MSDN, etc and wanted to retain the comments they have about each value in the enumeration ? You can ! Enum values can have comments in them like Simply edit each value in the enum and make sure you put one of the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.great-white-software.com\/blog\/2019\/06\/07\/handy-tip-for-enums\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Handy tip for Enums&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-67","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/67","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/comments?post=67"}],"version-history":[{"count":2,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/67\/revisions"}],"predecessor-version":[{"id":141,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/67\/revisions\/141"}],"wp:attachment":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/media?parent=67"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/categories?post=67"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/tags?post=67"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}