Gets a Hashtable from a list of objects.
A Hashtable containing the objects.
If objects is null and nullIfEmpty is true, null is returned. If objects is null and nullIfEmpty is false, an empty Hashtable is returned.
Hashtable table1 = MainUtil.GetHashtable(new object[] { "Name1", "Value1", "Name2", "Value2"}, true);
Hashtable table2 = MainUtil.GetHashtable(null, true); // null
Hashtable table3 = MainUtil.GetHashtable(null, false); // Hashtable
MainUtil Class | Sitecore Namespace