Browse by Tags

Spot the Bug! – The Key to using Anonymous Types (Jonathan Aneja)
16 November 09 11:54 PM
This one’s going to be long, but for those of you who’ve felt the first 3 in this series were too easy I promise this one’s tougher J . Let’s say you want to list all the customers from a table in a ComboBox, and update the UI based on which one is selected. Read More...
Spot the Bug! – Is it in VB or XAML? (Jonathan Aneja)
12 November 09 07:39 PM
What’s wrong with the following WPF code? Class Window1 Sub OK_Click(sender As Object , e As RoutedEventArgs) Handles OK.Click MsgBox( "Button Clicked" ) End Sub End Class < Window x : Class ="Window1" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Read More...
Postedby VBTeam | 0 Comments    
Spot the Bug! – Much ado about Nothing… Part 2! (Jonathan Aneja)
05 November 09 11:46 PM
In yesterday’s post we saw that the use of the wrong comparison operator with Nothing in an If block can lead to surprising results. Let’s look at a slightly different case today: Dim x As Integer = Nothing If x = Nothing Then MsgBox( "A true statement Read More...
Postedby VBTeam | 10 Comments    
Spot the Bug! – Much Ado about Nothing… (Jonathan Aneja)
03 November 09 06:32 PM
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 Read More...
Postedby VBTeam | 6 Comments    
Getting Loopy (Matt Gertz)
07 October 09 02:50 PM
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 Read More...
Postedby VBTeam | 10 Comments    
Filed under: , , ,
Hidden Costs (Matt Gertz)
06 October 09 12:54 PM
(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 Read More...
Postedby VBTeam | 15 Comments    
Filed under: , , ,
Did you know? You can unwind the call stack from exceptions (Bill Horst)
09 December 08 08:00 AM
The ability to unwind the call stack from exceptions is one of the debugger features that was newly introduced in Visual Basic.NET 2005. When the debugger hits a first-chance exception, you can unwind the call stack in order to make code edits to fix Read More...
Postedby VBTeam | 1 Comments    
Did you know? There are many ways to insert a snippet into your code (Lisa Feigenbaum)
07 December 08 08:00 AM
Code snippets were introduced in the Visual Basic 2005 release. They provide an easy way to learn how to do a particular coding task, or to re-use a piece of code in various parts of your application. Code snippets can be inserted in a variety of ways. Read More...
Postedby VBTeam | 5 Comments    
VB Catch ... When: Why so special?
09 October 08 08:00 AM
The VB Catch syntax has a unique feature: When. It allows users to filter expressions based on something other than their type. Any arbitrary code can enter a When block to decide whether or not to handle an Exception. Sub Sub1() Try DoSomeAction() Catch Read More...
Postedby VBTeam | 5 Comments    

This Blog

Syndication

Page view tracker