public void Store ()
{
Properties props = new Properties();
props.Add ("foo", "this");
props.Add ("bar", "is");
props.Add ("baz", "it");
FileInfo file = new FileInfo ("properties.test");
try
{
// write 'em out with the specified header...
using (Stream cout = file.OpenWrite ())
{
props.Store (cout, "My Properties");
}
}
finally
{
try
{
file.Delete ();
}
catch (IOException)
{
}
}
}