Bill Blogs in C#

Bill Wagner discusses C#, LINQ, and other items of interest

Browse by Tags

All Tags » C# » DevCenterPosts (RSS)
A Functional Programming Q & A
I received this question in email from one of my readers, and I thought it would be of general interest: I find myself with two arrays of the same size and I want to create a third that combines each element. What I want is something similar to var S3...

Posted by wwagner | 2 comment(s)

Discussion on Project Euler Problem 2
The second Euler problem asks you to find the sum of all even valued terms in the Fibonacci sequence which do not exceed 4,000,000. Let's look at the solution from the outside in. Here's the query that finds the answer: var EvenFibNumbers = (from...

Posted by wwagner | with no comments

Project Euler: Problem 1
I am starting a new series. A friend recently pointed me at the Project Euler problems. You can see the project here: http://projecteuler.net/ As I finish them, I'll post an explanation of the problem and the code here. I've also posted the code...

Posted by wwagner | 6 comment(s)

Filed under: , , ,

Looking Inside C# Closures
If you're like me, you understand new language features better when you see what the new language features generate for you. Closures in C# are no different. There's quite a bit that goes on under the covers in a C# closure. Looking at all the...

Posted by wwagner | 4 comment(s)

Yet another use for Extension methods : Extending IComparable<T>
I keep finding more uses for extension methods. This time it's extending IComparable<T>. The API signature for IComparable<T> has been around since the dawn of C: if the left is less than the right, return something less than 0, if left...

Posted by wwagner | 4 comment(s)