コード例 #1
0
 public string GetObjectName(string name, bool quote = true)
 {
     if (name.Contains(" ") && name.IndexOf('[') == -1 || ReservedWords.ContainsKey(name))
     {
         return("[" + name + "]");
     }
     else
     {
         return(name);
     }
 }
コード例 #2
0
 public string GetObjectName(string name, bool quote = true)
 {
     name = getObjectName(name);
     if (string.IsNullOrWhiteSpace(name))
     {
         return(name);
     }
     if (name.Contains(" ") && name.IndexOf('"') == -1 || ReservedWords.ContainsKey(name))
     {
         return("\"" + name + "\"");
     }
     else
     {
         return(name);
     }
 }