FoxMcloud5655 / NEW-NUSGrabberGUI

A program to allow people to acquire and decrypt updates to Wii U software on their computer.
GNU General Public License v3.0
51 stars 17 forks source link

Mostly refactoring #18

Closed akorb closed 6 years ago

FoxMcloud5655 commented 7 years ago

A lot of this simplified code takes away the file security that I have in place. For example, the "using" on the File Read automatically closes the file handle when it's finished. What you have works better, but doesn't close the file handle until the program stops.

akorb commented 7 years ago

This method opens a file, reads each line of the file, and then adds each line as an element of a string. It then closes the file.

File.ReadAllText - MSDN

akorb commented 6 years ago

I totally understand your worry, but File.ReadAllText closes the handle too. Actually, it contains almost exactly the same code as yours behind the scenes. See: https://referencesource.microsoft.com/#mscorlib/system/io/file.cs,c193e57831aa94a9,references