Browse by Tags
All Tags »
C# (
RSS)
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
More Posts
Next page »