/// <summary> Create an ExtendedProperties object that is a subset
		/// of this one. Take into account duplicate keys
		/// by using the setProperty() in ExtendedProperties.
		/// *
		/// </summary>
		/// <param name="prefix">prefix
		///
		/// </param>
		public ExtendedProperties Subset(String prefix)
		{
			ExtendedProperties c = new ExtendedProperties();
			bool validSubset = false;

			foreach(Object key in Keys)
			{
				if (key is String && ((String) key).StartsWith(prefix))
				{
					if (!validSubset)
						validSubset = true;

					String newKey;

					/*
					* Check to make sure that c.subset(prefix) doesn't
					* blow up when there is only a single property
					* with the key prefix. This is not a useful
					* subset but it is a valid subset.
					*/
					if (((String) key).Length == prefix.Length)
					{
						newKey = prefix;
					}
					else
					{
						newKey = ((String) key).Substring(prefix.Length + 1);
					}

					/*
						*  use addPropertyDirect() - this will plug the data as 
						*  is into the Map, but will also do the right thing
						*  re key accounting
						*/

					c.AddPropertyDirect(newKey, this[key]);
				}
			}

			if (validSubset)
			{
				return c;
			}
			else
			{
				return null;
			}
		}