Visual Basic Blog

A group blog from members of the VB team

Spot the Bug! – Much Ado about Nothing… (Jonathan Aneja)

Microsoft has this neat mailing list called “Spot the Bug” where developers can send interesting snippets of code that look correct but actually have subtle bugs in them.  The puzzles are a lot of fun and I’ve always thought it’d be a fun thing to try here on the team blog.  Over the past year or so I’ve been keeping a list...

Getting Loopy (Matt Gertz)

In my last post, I talked about the hidden costs that can occur whenever you call out to methods, particularly in loops.  In looking at my examples, reader KG2V commented that another thing that folks need to be aware of is avoiding the assumption that the world (or, in this case, a list) is a static thing.  It’s a good point ...

Hidden Costs (Matt Gertz)

(Note: there was a grievous error in this post based on a bad assumption on my art regarding VB.  Not feeling the need to hide my ignorance :-), I have instead made a number of edits in this post to bring it back to some semblance of reality.)One thing that gets me annoyed with myself is realizing that the product or service I’ve ...

Testing Events for Nothing/Null (Doug Rothaus)

While helping some Windows API folks with some sample code this week, I stumbled upon...uh...I mean “carefully researched” an issue that you might find handy.You may be aware that the RaiseEvent statement automatically checks to verify if an event handler exists before raising the event. If the event is Nothing, then there’s ...

Dynamic Searching using LINQ – Dataset + Joins

About two years ago I posted some code that shows how to dynamically construct LINQ queries at runtime.  On average there's a couple questions per month about trying it in some edge case, and usually the support already exists within the API.  Recently though someone posted a question that has to do with Datasets and Joins that ...

VB Entity Framework Samples Now Available (Lisa Feigenbaum)

There are a lot of great Entity Framework samples on Code Gallery that you can now find available in Visual Basic .NET. This was recently announced on the ADO.NET team blog. Browse through the list below and start downloading! ADO.NET Entity Framework Query Samples (Download)ADO.NET Entity Framework Query Samples is a small Windows Forms ...

Phoning Home, revisited (Matt Gertz)

In my post “M. G. Phone Home,” I discussed how to write a simple phone application for Windows Mobile, using Visual Basic, which accesses the Bluetooth service.  What I didn’t discuss was how to deploy it to the phone via CAB.  Since I purchased a new phone yesterday (a Samsung Saga, running Windows Mobile 6.1), and...

CodeRush Xpress 9.1 Beta: 59 Refactorings, 17 Consume-first providers, and Much more! (Lisa Feigenbaum)

Very exciting news! Developer Express is coming out with a new version of the FREE add-in we all know today as Refactor!. The new product, CodeRush XPress, builds on Refactor! by increasing the refactoring count to 59! It also includes a host of other editing functionality, making it a much richer tool for all-around IDE productivity. Consume-...