switched netstd keywords from map to set and array init
diff --git a/compiler/cpp/src/thrift/generate/t_netstd_generator.cc b/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
index b9c7fa8..96bdc3c 100644
--- a/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
@@ -123,11 +123,6 @@
 
 bool t_netstd_generator::is_union_enabled() const { return union_; }
 
-map<string, int> t_netstd_generator::get_keywords_list() const
-{
-    return netstd_keywords;
-}
-
 void t_netstd_generator::init_generator()
 {
     MKDIR(get_out_dir().c_str());
@@ -151,7 +146,6 @@
     }
 
     namespace_dir_ = subdir;
-    init_keywords();
 
     while (!member_mapping_scopes.empty())
     {
@@ -189,116 +183,6 @@
     return name;
 }
 
-void t_netstd_generator::init_keywords()
-{
-    netstd_keywords.clear();
-
-    // C# keywords
-    netstd_keywords["abstract"] = 1;
-    netstd_keywords["as"] = 1;
-    netstd_keywords["base"] = 1;
-    netstd_keywords["bool"] = 1;
-    netstd_keywords["break"] = 1;
-    netstd_keywords["byte"] = 1;
-    netstd_keywords["case"] = 1;
-    netstd_keywords["catch"] = 1;
-    netstd_keywords["char"] = 1;
-    netstd_keywords["checked"] = 1;
-    netstd_keywords["class"] = 1;
-    netstd_keywords["const"] = 1;
-    netstd_keywords["continue"] = 1;
-    netstd_keywords["decimal"] = 1;
-    netstd_keywords["default"] = 1;
-    netstd_keywords["delegate"] = 1;
-    netstd_keywords["do"] = 1;
-    netstd_keywords["double"] = 1;
-    netstd_keywords["else"] = 1;
-    netstd_keywords["enum"] = 1;
-    netstd_keywords["event"] = 1;
-    netstd_keywords["explicit"] = 1;
-    netstd_keywords["extern"] = 1;
-    netstd_keywords["false"] = 1;
-    netstd_keywords["finally"] = 1;
-    netstd_keywords["fixed"] = 1;
-    netstd_keywords["float"] = 1;
-    netstd_keywords["for"] = 1;
-    netstd_keywords["foreach"] = 1;
-    netstd_keywords["goto"] = 1;
-    netstd_keywords["if"] = 1;
-    netstd_keywords["implicit"] = 1;
-    netstd_keywords["in"] = 1;
-    netstd_keywords["int"] = 1;
-    netstd_keywords["interface"] = 1;
-    netstd_keywords["internal"] = 1;
-    netstd_keywords["is"] = 1;
-    netstd_keywords["lock"] = 1;
-    netstd_keywords["long"] = 1;
-    netstd_keywords["namespace"] = 1;
-    netstd_keywords["new"] = 1;
-    netstd_keywords["null"] = 1;
-    netstd_keywords["object"] = 1;
-    netstd_keywords["operator"] = 1;
-    netstd_keywords["out"] = 1;
-    netstd_keywords["override"] = 1;
-    netstd_keywords["params"] = 1;
-    netstd_keywords["private"] = 1;
-    netstd_keywords["protected"] = 1;
-    netstd_keywords["public"] = 1;
-    netstd_keywords["readonly"] = 1;
-    netstd_keywords["ref"] = 1;
-    netstd_keywords["return"] = 1;
-    netstd_keywords["sbyte"] = 1;
-    netstd_keywords["sealed"] = 1;
-    netstd_keywords["short"] = 1;
-    netstd_keywords["sizeof"] = 1;
-    netstd_keywords["stackalloc"] = 1;
-    netstd_keywords["static"] = 1;
-    netstd_keywords["string"] = 1;
-    netstd_keywords["struct"] = 1;
-    netstd_keywords["switch"] = 1;
-    netstd_keywords["this"] = 1;
-    netstd_keywords["throw"] = 1;
-    netstd_keywords["true"] = 1;
-    netstd_keywords["try"] = 1;
-    netstd_keywords["typeof"] = 1;
-    netstd_keywords["uint"] = 1;
-    netstd_keywords["ulong"] = 1;
-    netstd_keywords["unchecked"] = 1;
-    netstd_keywords["unsafe"] = 1;
-    netstd_keywords["ushort"] = 1;
-    netstd_keywords["using"] = 1;
-    netstd_keywords["virtual"] = 1;
-    netstd_keywords["void"] = 1;
-    netstd_keywords["volatile"] = 1;
-    netstd_keywords["while"] = 1;
-
-    // C# contextual keywords
-    netstd_keywords["add"] = 1;
-    netstd_keywords["alias"] = 1;
-    netstd_keywords["ascending"] = 1;
-    netstd_keywords["async"] = 1;
-    netstd_keywords["await"] = 1;
-    netstd_keywords["descending"] = 1;
-    netstd_keywords["dynamic"] = 1;
-    netstd_keywords["from"] = 1;
-    netstd_keywords["get"] = 1;
-    netstd_keywords["global"] = 1;
-    netstd_keywords["group"] = 1;
-    netstd_keywords["into"] = 1;
-    netstd_keywords["join"] = 1;
-    netstd_keywords["let"] = 1;
-    netstd_keywords["orderby"] = 1;
-    netstd_keywords["partial"] = 1;
-    netstd_keywords["remove"] = 1;
-    netstd_keywords["select"] = 1;
-    netstd_keywords["set"] = 1;
-    netstd_keywords["value"] = 1;
-    netstd_keywords["var"] = 1;
-    netstd_keywords["where"] = 1;
-    netstd_keywords["yield"] = 1;
-
-    netstd_keywords["when"] = 1;
-}
 
 void t_netstd_generator::reset_indent() {
   while( indent_count() > 0) {
diff --git a/compiler/cpp/src/thrift/generate/t_netstd_generator.h b/compiler/cpp/src/thrift/generate/t_netstd_generator.h
index b9456c8..f16f7d3 100644
--- a/compiler/cpp/src/thrift/generate/t_netstd_generator.h
+++ b/compiler/cpp/src/thrift/generate/t_netstd_generator.h
@@ -37,6 +37,7 @@
 #include "thrift/generate/t_oop_generator.h"
 
 using std::map;
+using std::set;
 using std::ostream;
 using std::ostringstream;
 using std::string;
@@ -66,7 +67,6 @@
   bool is_hashcode_enabled() const;
   bool is_serialize_enabled() const;
   bool is_union_enabled() const;
-  map<string, int> get_keywords_list() const;
 
   // overrides
   void init_generator() override;
@@ -180,13 +180,26 @@
   bool use_net6_features;
   bool add_async_postfix;
 
+  const std::string CSHARP_KEYWORDS[101] = {
+    // C# keywords
+    "abstract", "as", "base", "bool", "break", "byte", "case", "catch", "char", "checked", "class", "const", "continue", 
+    "decimal", "default", "delegate", "do", "double", "else", "enum", "event", "explicit", "extern", "false", "finally", 
+    "fixed", "float", "for", "foreach", "goto", "if", "implicit", "in", "int", "interface", "internal", "is", "lock", 
+    "long", "namespace", "new", "null", "object", "operator", "out", "override", "params", "private", "protected", 
+    "public", "readonly", "ref", "return", "sbyte", "sealed", "short", "sizeof", "stackalloc", "static", "string", 
+    "struct", "switch", "this", "throw", "true", "try", "typeof", "uint", "ulong", "unchecked", "unsafe", "ushort", 
+    "using", "virtual", "void", "volatile", "while", 
+    // C# contextual keywords
+    "add", "alias", "ascending", "async", "await", "descending", "dynamic", "from", "get", "global", "group", "into", 
+    "join", "let", "orderby", "partial", "remove", "select", "set", "value", "var", "when", "where", "yield"
+  };
+
   string wcf_namespace_;
-  map<string, int> netstd_keywords;
+  std::set<string> netstd_keywords = std::set<string>(CSHARP_KEYWORDS, CSHARP_KEYWORDS + sizeof(CSHARP_KEYWORDS) / sizeof(CSHARP_KEYWORDS[0]));
   vector<member_mapping_scope> member_mapping_scopes;
   map<string, t_type*> collected_extension_types;
   map<string, t_type*> checked_extension_types;
   
-  void init_keywords();
   string normalize_name(string name, bool is_arg_name = false);
   string make_valid_csharp_identifier(string const& fromName);
   string make_csharp_string_literal( string const& value);