Browse by Tags
All Tags »
C# General (
RSS)
OK, this is why my blogging activity has slowed to a crawl, or downright stopped lately. I've been working quite a bit on my next book: More Effective C#. It's getting closer, and it's now available on Rough Cuts. Rough Cuts is a Safari Books...
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 fourth Euler problem asks you to find the largest palindrome number that is the product of two three digit numbers. For example, the number 919 is a palindrome: it's the same forward and backwards. To solve this problem, we need to find the product...
Here are my notes on the third Project Euler problem. The problem is "What is the largest prime factor of the number 600,851,475,143?" Once again, this is a problem that is best solved creating some simple LINQ queries. From the outside, this...
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...
Dave Donaldson asks " Do you write software at homer like you do at work? " Dave wonders if we use the same discipline writing software at home (for our own use) that we do at work. I think the question is great, but I'm concerned about...
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...
More Posts
Next page »