Bill Blogs in C#

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

Browse by Tags

All Tags » C# (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)

The Obligatory Post-MVP Summit Post
Well, I'm back from the MVP Summit, and it seems that tradition mandates a summary of the trip. But there is one problem: The best content was all under NDA. Most MVPs spend their time with members of the product team for their award, and other teams...

Posted by wwagner | with no comments

Filed under: , ,

Project Euler problem 6
Euler Problem six asks you to find the difference between the sum of squares and the square of the sum for the natural numbers 1 through 100. I took the easy route, and made a brute force implementation in C#. There are a couple new bits of LINQ syntax...

Posted by wwagner | 1 comment(s)

Filed under: , , ,

Euler Problem 5
Well, it's time to post another solution and look at how LINQ and C# 3.0 can create elegant code for these problems. The fifth problem asks you to find the smallest number that is divisible by all the natural numbers from 1 through 20. You can trivially...

Posted by wwagner | 1 comment(s)

Filed under: , ,

Euler problems in other languages
I've had some comments on the Euler problems, so I'm assuming there is some interest. There's also been interest among other developers in our office. Darrell Hawley has started solving the problems in Python. Marina Fedner has started solving...

Posted by wwagner | with no comments

Filed under: , , ,

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: , , ,

Some Clarification on VSTS licensing, builds, and Continuous Integration
Jeff Beehler wrote this post clarifying some questions on VSTS licensing as it relates to build environments. There is a common misconception (that I shared) that your build machine needed a licensed copy of VSTS team developer. In fact, that's not...

Posted by wwagner | 1 comment(s)

Filed under: , ,

My second DNR TV is live
The world-famous Carl Franklin invited be to be on DNR TV again. The episode is live here: http://dnrtv.com/default.aspx?showID=105 We discuss generics in C#, and how you can use generics to create more reusable block of code. We go from fairly obvious...

Posted by wwagner | 3 comment(s)

Filed under: , , ,

Thoughts on Coupling
One of our goals when we create software is to minimize the coupling between different components. By minimizing coupling, we make it easier to create different building blocks that can be used by more different types, in more different ways, and in more...

Posted by wwagner | 2 comment(s)

Filed under: ,

Link: C# Future Focus
Charlie Calvert has posted an article that is co-authored by Mads Torgerson on one possible implementation of Dynamic method invocation in a future version of C#: http://blogs.msdn.com/charlie/archive/2008/01/25/future-focus.aspx There are already a number...

Posted by wwagner | with no comments

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)

Announcement: C# Jam in April
I'm really looking forward to this. We're hosting a 4 day C# Jam April 8 -11, at our office. There's a lot that I like in the format: I'm co-instructing with Bruce Eckel and Jamie King, two of the smartest, insightful people in our industry...

Posted by wwagner | 1 comment(s)

DNR TV on Learning C#
Carl Franklin and I got together and did an intro to C# for VB.NET developers last month. The first version is up here: http://www.dnrtv.com/ Or, watch the silverlight version here: http://perseus.franklins.net/dnrtv/0096/silverlight/video.html This discussion...

Posted by wwagner | with no comments

Filed under: , ,

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)

More Posts Next page »