' 创建第一个项。
SaveSetting("TestApp","Startup","FirstKey","First")
' 创建第一个子项。
SaveSetting("TestApp","FirstKey","FirstSubKey","FirstSub")
' 创建第二个子项。
SaveSetting("TestApp","FirstKey","SecondSubKey","SecondSub")
Try
' 写出第一个项的值。
Console.WriteLine ((GetSetting("TestApp","Startup","FirstKey"))
' 写出第一个项及其两个子项。
Console.WriteLine (GetAllSettings("TestApp","Startup"))
Catch e As ArgumentException
Catch e As Exception
Console.WriteLine (e.GetType.ToString)
Finally
End Try
DeleteSetting("TestApp","FirstKey","SecondSubKey")
Try
Console.WriteLine (GetSetting("TestApp","Startup","FirstKey"))
Console.WriteLine (GetAllSettings("TestApp","Startup"))
Catch e As ArgumentException
Catch e As Exception
Console.WriteLine (e.GetType.ToString)
Finally
End Try