title: How to Initialize Values to a HashSet<String[,]> in C#
body: <p>I am using VS 2008 and I need to know how to initialize the HashSet. I know Some values which is needed to add it during initialization. How can I add values to the tblNames.</p>
  
  <pre><code>System.Collections.Generic.HashSet&lt;String[,]&gt; tblNames;
              tblNames = new System.Collections.Generic.HashSet&lt;string[,]&gt;();
  
  tblNames.Add(new String[0,0] {"tblCategory","CatName" ,}); // this is showing Error..
  </code></pre>
  
  <p>The ultimate aim is to prevent user from entering duplicate values.I need to check it from different forms and from different tables and different fields.I go for querying the database using a dynamic query. I need to store the table name and column name in some index,value,value format <code>for eg My tablename is tblCategory and field name is CatName</code>.So I will store the value in the way<code>0,tblCategory,CatName</code>. So I will use Ajax to a handler page and in that I am using the above code.Here I am passing <code>0</code> to get the <code>first value[tablename and column name]</code>,1 for another table and field and so on. So I thought of using this way. </p>
  
  <p>Whether I am using the correct way or any other way to achieve the aim ie  to prevent user from entering duplicate values ?</p>
  
  <p>Thanks ,Harie </p>