public static StringDictionary GetProperties(StringDictionary props, string prefix)
{
if(props == null)
{
throw new Exception("Properties Object was null");
}
StringDictionary result = new StringDictionary();
foreach(string key in props.Keys)
{
if(key.StartsWith(prefix, StringComparison.InvariantCultureIgnoreCase))
{
string bareKey = key.Substring(prefix.Length);
String value = props[key];
result[bareKey] = value;
}
}
return result;
}