Smart Copy and Paste from StackOverflow–part 2 from 7

I have written this mini e-book in order to remember myself how to do it .

I will put each week a part from my book here in the blog. If you want , however, buy the book, I will do appreciate !

 

Examples in this book

1. Sort a collection

Let’s suppose we have a class Person with FirstName and LastName as properties. Also we have a collection ( List<Person>) that contains multiple persons( loaded from a database[1]). We want to let the user sort this collection for FirstName or LastName at his choice.

2. Store encrypted data in a file

Let’s suppose that we have a connection string[2] ( with user and password) to connect to a database. We want to be able change this – to accommodate software for the buyer. But we do not want to let the user know the connection string – to protect lazy database administrators. A solution is to encrypt the connection string , store it and later retrieve and decrypt it.


[1]by database I understand any physical support of storing data that can be retrieved later. It does not matter if Relational or No-SQL or text file

[2]do you know http://www.connectionstrings.com/ ?

 

 

The book link is http://www.amazon.com/Smart-Paste-Stack-Overflow-other-ebook/dp/B01EHI5RQM