Question: ```
foreach (var item in mainCanvas.Children)
{
    if (item is Button)
    {
        (item as Button).Content = "this is a button";
    }                
}

```

Can I use LINQ or other feature of .NET 4 to be more concise (maybe performant)?

Answer: 
One line should do it

```
mainCanvas.Children.OfType<Button>.ToList().ForEach(b => b.Content = "this is a button");

```
To only iterate over actual buttons in a collection, you can do:

```
foreach(Button button in mainCanvas.Children)
     button.Content = "this is a button";

```

As far as I understand, this is syntax sugar that gets converted into Method 4 above. But don't quote me on that. (EDIT: Method 3 I meant)