Timeline for C# AES Encryption
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 23, 2015 at 16:49 | comment | added | Heslacher |
For String.Empty I said should, because I think it is more readable on the first glance. To distinguish between "" and " " with not so good eyes is hard. For var I said could to show this possibility.
|
|
| Jan 23, 2015 at 16:46 | comment | added | Sam |
I'm also curious why you suggested me using the more verbose String.Empty instead of "", then recommended I use the less verbose var instead of the type name?
|
|
| Jan 23, 2015 at 16:45 | comment | added | Sam | Thanks for the feedback. I tend to use if blocks without brackets if the condition only uses one line and there is no else condition. I had been using String.Empty for several years, but someone convinced me that "" is shorter and easier for JavaScript/Java people to read/understand. I'm a little embarrassed that I've been programming in C# for almost 10 years and didn't know about stacking usings. However, in this case the CryptoStream has to be disposed of before you can read from the memory stream. | |
| Jan 23, 2015 at 16:05 | history | answered | Heslacher | CC BY-SA 3.0 |