It might be duplicate with other questions, but I swear that I googled a lot and search at StackOverflow.com a lot, and I cannot find the answer to my question:
In a C#.
Either option 1 (plain registry key) or 2 (plain file) is just fine. Here's my reasoning: