C# Quick Question 4
/Why do we need the finally clause in a try construction? Can’t code to be run after the code in a try clause just be put straight after the end of the catch?
Rob Miles on the web. Also available in Real Life (tm)
Why do we need the finally clause in a try construction? Can’t code to be run after the code in a try clause just be put straight after the end of the catch?
Why does the exclusive-or (^) operator not have a short circuit version
"When would a value type be stored on the heap?" And no, the answer doesn't involve boxing.
OK. I'm going to post a few C# Quick Questions. They're things that have come up as I'm writing the book. Today's question:
Can I make some C# that compiles and contains these two statements? What type are d and x?
d = null;
d += x;
Â
Don't expect much sense from me for the next few weeks. I'm going to spending all available hours writing pages for the latest book.
When we had our awful struggle to get to the airport a couple of weeks ago one of the things that sustained me was the knowledge that at least it wouldn't be this bad on the way back.
Ha.
Turns out that Mother Nature (tm) had arranged another show of strength just as we got back into the country, with lots of thick snow and the prospect of blocked motorways.
Fortunately, with jetlag you don't let such trifling things as icy roads worry you. All you want to do is sleep. So we got a train and a taxi back to our snowbound car, loaded it up and shot onto the M62 before fate noticed. And we got home just fine.
We've had a lovely time away. All the better for not having to be at home.
Flying home today. In a window seat with legroom. Double win!
Today is our last full day in this lovely place. It's gone by really quickly. And we are going to try really hard to come back here again sometime.
We keep hearing reports of the horrible weather in England. Well, turns out its rather nice here. We went off to the University shopping mall today to pick up some presents and stuff. And the blossom is out.
Hmm. The Starbucks Reserve Roastery in Seattle might be a cynical piece of coffee merchandising masquerading as a place where they make and roast overpriced coffee, but we do really like it there. And the coffee is very nice too.
It's hard to avoid the Seattle Museum of Pop Culture. For one thing the monorail actually drives through the middle of the building on the way to the Space Needle. For another it has the most amazing architecture. We've never got round to taking a proper look in the place. Until today.
To be honest I wasn't expecting that much, perhaps a few guitars in glass cases. But there was much more than that, including a really good Star Trek exhibition and stuff that kept us occupied for just about half of the day. They even had a David Bowie film where he actually mentioned Hull.
After our does of culture we headed back to Capitol Hill to meet up with a bunch of ex-Hull students who are now Microsoft folk. Quite a few of them got their big break as part of Imagine Cup teams. All doing very well, lots of great chat and lovely to see them all. They look so grown up. Probably because they are. And we got a bunch of recommendations for places to visit during our final days here.
I think this is my favourite picture of the trip so far. I took it on the ferry as we headed out to Bainbridge Island. Lovely place.
Another day. More amazing weather. Apparently temperatures records are on the verge of being broken (They are back home in England too, but in an entirely less pleasant way).
Anyhoo, whenever I'm in Seattle I go up the Space Needed. Always have. Always will. They're in the middle of a great big refurbishment exercise at the moment, replacing the sides of the viewing platform with enormous slabs of glass. This meant that we didn't get to walk all the way round the outside as we normally like to, but even so the view was rather nice, and you can actually see the mountain, which is nice.
Shurey shome mishtake I can hear you thinking. But no. Today we went up to one of my other favourite places in the world, Pike Place Market. And the sun was beating down.
Today's Seattle travel tip: If you get the chance, have the Lava Cake. It's amazing.
Ada's is one of my favourite places on the planet. Lots of interesting stuff, great food and a fantastic atmosphere. We had tea there today.
They even have a copy of my book in stock. Awesome.
Last night we went into the MVP party for a while. Great fun. They are usually very loud affairs, but not this time. They had loads of headphones that you could use to hear any one of a number of different disco soundtracks (including classical music). And you could even change the colour of the cool lights on their sides. Awesome. It's been a great summit. Lots of lovely technical content. Lots of chances to say what we thought of it, and a great place to catch up with folks.
Today we're heading for an apartment in Capitol Hill, a rather nice part of Seattle for a few days.
I'd forgotten how much I like slick developer presentations. We got to sit in on one today. You can find out what it was all about (it's not secret) here.
More great content. More chocolate milk.
We had day 1 of the MVP summit today. Lots of really interesting stuff. And chocolate milk.
One of the lovely things about the MVP Summit is the "appreciation night" that they organise for us each time we come. It's nice to be appreciated. This year we all descended on a whiskey distillery to sample a few, eat some good grub and maybe do a little light gambling. Great fun.
The best gambler of the night earned a substantial donation to a charity of their choice. I was not the best gambler of the night. In fact it all served as a salutary lesson for me as to how fast you can burn through money, even if it is fake...
A great time was had by everybody. Thanks to the folks from Microsoft for setting up such an excellent event.
Rob Miles is technology author and educator who spent many years as a lecturer in Computer Science at the University of Hull. He is also a Microsoft Developer Technologies MVP. He is into technology, teaching and photography. He is the author of the World Famous C# Yellow Book and almost as handsome as he thinks he is.
Begin to Code with JavaScript is now available for purchase and download. You can find it here