Here’s a super simple function that generates humanly readable passwords by weaving random consonants and wovels. The generated passwords are by no means secure. I did this for an application used to launch game servers and wanted to make the passwords be easy to communicate over Skype.
Put this in a static class. This will apply to Lists of any type. Simply call it like this
Lets say you have a list of person objects (List persons) You may use Sort to update the existing list. or OrderBy to produce a new, ordered list.
Converting seconds into days, hours, minutes and seconds int days = secondsTotal / 60 / 60 / 24; int hours = (secondsTotal / 60 / 60) % 24; int minutes = (secondsTotal / 60) % 60; int seconds = secondsTotal % 60;
Add an event handler for Form Closing and use this code. This is a really simple solution.