Originally posted by Master
Even if a program simple, you should use good practice. By putting them in a resource file, you save yourself multiple magic string problems.
It makes your code neater and easier to read.
Although it isn't necessary for this program, it is better for bigger programs like it.
This is just an example of something simple. There is good practice in everything but you need to look at the situation at hand. If one was to ultimately handle user information that allowed for registration, the best method would be to handle it all on a server where the information is stored, that way that information is kept from the users.
Putting things in a resource file, example, minecraft; where the password is stored is one thing. The problem with that is that if a user wanted access to that file and the contents, they would easily be able to reflect your program and access the data of that file by reversing your encryption or just following how you decrypt it within the program.
Code being easier to read, if you code in user login details within an application; it's not hard to make it neat. If anything, you can create a list that has a corresponding list
It's all about the situation though, please understand that.
If I was truly going to create a program that required login, I'd still just create an output file using SQL.
The reason why I am saying the above is because these are the arguments you will hear. One thing is not always best; it's all based upon the situation.