Ziff Davis EnterpriseDevLife
Advertisement

Tuesday, November 18, 2008 12:32 PM/EST

Wait a minute! What language was I coding in again?

Something very funny happened when I was presenting my Deep Dive into Entity Framework Object Services session at DevConnections last month.

The book I am writing has all samples in both VB and C# which means that I have done more C# coding during the course of writing this book than I have since .NET came along.

This gives me more confidence to work with C# live during presentations, so I now like to mix it up with some VB and some C# during sessions so that everyone gets to see some of their own language. Of course, I'm much more proficient in VB since, (as I like to quote Carl Franklin) "I dream in VB".

In this presentaiton I was going over a code module that I wrote in C#. It leverages a utility in another assembly. As I stepped from the C# module into the code in the other assembly during debug, I wanted to take a look at the values of an array. I opened up Visual Studio's QuickWatch window while pointing out how clever I was to remember to use square brackets to get to the array item rather than the parentheses that I normally use in VB, and typed in array[0]. But it didn't work!

I tried it a few times, looked back at the code, went back the QuickWatch window - but it kept failing.

Until I realized the problem.

The assembly I had stepped into was in VB! (Yes I had written it myself and have worked with it many times). But I was so stuck on the fact that I had begun the demo in C#, I had not remembered (or even noticed when I was looking at the code and pointing out it's tasks) that I had moved over to VB.

And this is the language that I know in my sleep!

Thankfully, the audience also saw the humor in my fumbling with the QuickWatch window with my "natural" language.

I'm doing the same talk at DevTeach in Montreal in early December, and will probably leave the mixed up code modules as they are. If I remember that I'm in VB when I get there, that will be nice. Otherwise, the joke will be on me and I'll happily pay the price again for a good laugh.

TrackBack

TrackBack

http://blogs.devsource.com/cgi-bin/mte/mt-tb.cgi/15823

Post a Comment

 
 

Advertisement

Syndication

Subscribe: