- Greetings! I am Torleif Berger, 25 years old, a Seventh-Day Adventist and currently working as a Software Developer. Have a look around c'',)
Tag Archives: C#
C#: How to send emails
Sending a basic email message in a C# application is quite easy thanks to a class called SmptClient. We simply need an address to send to, an address to send from, the message we want to send and the client: … Continue reading
How to check for duplicates
Say you have an IEnumerable<t></t> of some sort and you want to check if it contains any duplicates. How do you do that?
How to test asynchronous events
The other day I had to test that an event was raised after some asynchronous work had been done. And since I currently am a total test newbie, this was a new thing for me. Say we have this simple … Continue reading
Generics and checking for null
When writing C#, in Visual Studio, using generics… have you ever tried checking for null? I have always found that a bit of a hassle. Say we have this method which returns the subject if it is not null, and … Continue reading
Project Euler: Problem 25
The Fibonacci sequence is defined by the recurrence relation: , where and . Hence the first 12 terms will be: … The 12th term, , is the first term to contain three digits. What is the first term in the … Continue reading
Project Euler: Problem 16
and the sum of its digits is. What is the sum of the digits of the number ?
The Art of Unit Testing
Have you gone through three years of computer science bachelor degree fun (or anything similar) and pretty much not heard a word about testing? Or have you heard from all your teachers that testing is extremely important, but never learned … Continue reading
















