c# - Preload or Live Frequent Registry Read and Write -
i using registry store (20+) data values window location & size start with. curious if should preload of keys registry instead of live query them when or set called on variable. there risks querying or writing data registry frequently?
code example:
internal int mainwindowheight { { try { using (registrykey mykey = registry.currentuser.opensubkey("xxxxx")) { return convert.toint32(mykey.getvalue("xxxx")); } } catch { return 0; } } set { try { using (registrykey mykey = registry.currentuser.opensubkey("xxxxx", true)) { mykey.setvalue("xxxx", value, registryvaluekind.dword); } } catch {} } }
Comments
Post a Comment