Bill Blogs in C#

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

Browse by Tags

All Tags » C# General (RSS)
Rough Cuts available for "More Effective C#"
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...

Posted by wwagner | with no comments

Filed under: , ,

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

Euler Problem 4: Finding Palindrome numbers
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...

Posted by wwagner | 6 comment(s)

Filed under: , ,

Notes on Euler Problem 3
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...

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

Do I write software at home like I write at work?
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...

Posted by wwagner | 1 comment(s)

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)

More Posts Next page »