D'Arcy from Winnipeg wishes C# had a “with” statement.
Me, too. I've moved from VB6 to C# and am glad of it, but I really miss the old VB With/EndWith.
It's great for "chatty" interfaces, expecially the ability to nest With's to update "grandchild" properties:
With myCustomer
.FirstName = "Phillip"
.LastName = "Fry"
.MiddleInitial = "J"
.Age = 1024
With .Address
.AddressLine1 = "3000 Farnsworth Avenue"
.City = "New New York City"
.State = "NY"
.Zip = "101010001100011"
.Country = "USA"
.Galaxy = "Milky Way"
End With
End With