My name is Edward Tanguay. I'm an American software and web developer living and working in Berlin, Germany.
4 hours ago: If you are a developer in Berlin and need to improve your English, I'm looking for groups to teach after work: http://tanguay.info/itenglish.
5 hours ago: As far as I'm concerned, the singularity is already here, every time I wake up twitter tells me something amazing was created while I slept.
5 hours ago: We're not suffering from information overload, we're suffering from faulty filtering.
6 hours ago: Classic literature for free as nicely formatted 1-page or 2-page PDF downloads: http://www.planetebook.com/free-ebooks.asp.
6 hours ago: Yes, when you pour coffee, "a lightning storm of neuronal activity occurs almost across the entire brain": http://is.gd/eWO1T @pholdings.
23 hours ago: If you put two spaces after a period or use underlining for emphasis, you were born before 1980.
23 hours ago: Word of the day: infovore, n. an animal with a voracious appetite for information.
yesterday: It's said that on average people use less than 10% of their brain, but I think on average computers use less than 1% of their CPU.
2 days ago: Saturday fun: team drawing on two computers with six-year-old in a shared google doc diagram.
2 days ago: Someday I want to produce a developer podcast called "What's that?" but for now "the developer's life" is a nice genre: http://is.gd/eTURO.
3 days ago: Here's a use-case for datapod format, recording human-readable data that later can be used as a datasource: http://is.gd/eSsLg @pholdings.
WPF CODE EXAMPLE created on Friday, January 29, 2010 permalink
How to use brackets to define scope
In the past especially in unit-test code I've found myself creating variables such as **customer1**, **customer2**, **customer3** in one method since it was all the same scope. Just discovered that you can use brackets like this to create scope so that you can use the same variable repeatedly.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestScope8383
{
    class Program
    {
        static void Main(string[] args)
        {
            TheTest tt = new TheTest();
        }
    }

    public class TheTest
    {
        List<Customer> customers = new List<Customer>();

        public TheTest()
        {
            {
                Customer customer = new Customer { LastName = "Smith" };
                customers.Add(customer);
            }
            {
                Customer customer = new Customer { LastName = "Thompson" };
                customers.Add(customer);
            }

            customers.ForEach(c => Console.WriteLine(c.LastName));
            Console.ReadLine();
        }
    }
    public class Customer
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public string Street { get; set; }
        public string Location { get; set; }
        public string ZipCode { get; set; }

    }
}
Loren Andrus: Or, you could simply re-use the variable. (I don't understand why it seems so important to repeatedly create new variables with the same name. Apparently the example presented here is an artificially small sample to demonstrate the ability.)

Thus:

public TheTest()
{
     Customer customer = new Customer { LastName = "Smith" };
     customers.Add(customer);
     customer = new Customer { LastName = "Thompson" };
     customers.Add(customer);

     customers.ForEach(c => Console.WriteLine(c.LastName));
     Console.ReadLine();
}


Though, honestly, if I'm not doing anything else with the objects before dumping them into the list (or whatever), I don't even declare a variable for them.
need markup?