Swanky Encryption/Decryption in C# – CodeProject

“Using the built in crypto classes in .NET can be surprisingly complicated. You need a lot of understanding of what you are doing to get it right and how to work in a secure manner. The choice of algorithm, what cipher mode, key length, block size and understand what salt is and how to use it and also how to hash a password to a proper key are some things you need to deal with. Hopefully, this article will make your life a lot easier.

For those who are looking for a quick solution this is the basically the code you need to encrypt and decrypt data. And there is a lot of other examples in the downloadable code.”

From:

http://www.codeproject.com/Articles/789084/Swanky-encryption-decryption-in-Csharp?q=c%23+encrypt+passwords+best+way

C# Interactive Window · Wiki doc

The C# Interactive Window provides a fast and iterative way to learn APIs, experiment with code snippets, and test methods by giving immediate feedback on what an expression will return or what an API call does.

The C# Interactive Window is a read-eval-print-loop (REPL) with advanced editor support. It supports features like IntelliSense as well as the ability to redefine functions & classes. After entering a code snippet–which can contain class and function definitions at top-level along with statements–the code executes directly. This means you no longer need to open a project, define a namespace, define a Main method, add a Console.WriteLine() call to output your result, and add a Console.ReadLine() call in order to play with code. In other words, say goodbye to ConsoleApp137 or whatever ridiculously high number your Console Apps default to today!

Source: Interactive Window · dotnet/roslyn Wiki · GitHub

Unit testing faked async methods

With the addition of the async/await keywords in .NET Framework 4.5, many more methods will now return Task<TResult>.  For example, a web service method can now be created to return Task<TResult> so it is ready for the async/await keywords.  This brings up the question on how you can unit test these methods.

Read more: http://www.intertech.com/Blog/creating-a-task-with-a-known-result/#ixzz3xSNIAWB7