Visual Basic Blog

A group blog from members of the VB team

Latest posts

Apr 29, 2009
Post comments count 0
Post likes count 0

When using LINQ to XML why don’t I get results if I don’t import a XML namespace (Daniel Walzenbach)?

VBTeam

Hi,I posted a bit of code the other day which I used to get a list of all Code Snippets we ship in Visual Studio. In a nutshell, I used XElement.Load to create a new XML document from a filename from which I then read elements from (There are way to many ‘”from” in this sentence ;-) ). Unfortunately, I forgot to import the XML Namespace in the code I posted which caused my code not to return any results (but instead provided me with a brilliant opportunity to write another post. hehe :-) ).Let’s have a look at the code which is causing trouble and a Code Snippets to understand what’s...

Apr 29, 2009
Post comments count 0
Post likes count 0

Luca Bolognese on Asynchronous HTML caching in VB.NET (Lisa Feigenbaum)

Lisa Feigenbaum

You may know Luca Bolognese from his well-known work on C# LINQ. Luca is now the Group Program Manager for VB.NET, C#, and F#. You can check out his blog here. Luca recently blogged his first VB.NET post. It is about asynchronous HTML caching, and is part of a longer series in which he is converting a financial VBA Excel add-in to .NET. The code uses the .NET Parallel Extensions that will be shipping in Visual Studio 2010 and .NET Framework 4.0. Check it out at the link below:An Async Html cache – part I

Apr 23, 2009
Post comments count 0
Post likes count 0

How to get a list of all files of a directory (subdirectories included) (Daniel Walzenbach)?

VBTeam

I needed to create a list of all Code Snippets we ship in Visual Studio the other day containing their title, description and path on disc and size. As you might know, Code Snippets are stored in multiple directories below "%ProgramFiles%Microsoft Visual Studio 10.0" so I had to traverse all the subdirectories of the aforementioned path to find all snippets. Fortunately – linq to the rescue – this came down to a few lines of code :-)This statement gives you a List of Strings (or, to be a bit more precise, a System.Linq.IOrderedEnumerable(Of String)) which you can walk over to do all kinds of crazy thi...

Apr 16, 2009
Post comments count 0
Post likes count 0

Two free e-books available till April 22th to celebrate MS Press’s 25th b-day (Daniel Walzenbach)

VBTeam

2009 is the 25th anniversary of Microsoft Press! To celebrate their b-bay they’re giving away two free e-books, namely Before opening one of the links make sure that you disable your Pop-Up blocker as the window containing the book will be opened in a new window. Additionally, when the new window gets opened give it some time to show the content as the VB book is roughly 8MB and the Windows Small Business Server book is around 24MB. To download the book click "Page >> Save As..." and rename the download in the Save window. Get them as soon as the offer lasts (April 22nd) :-) Daniel Edited April 22...

Apr 13, 2009
Post comments count 0
Post likes count 0

Keep the Customer Satisfied (Matt Gertz)

Anthony D. Green [MSFT]

As I’ve written elsewhere, the toughest critics for any work you do can always be found in your own family.  Pleased at the immense work that I’d done in scanning in and tagging all of my photos and media (as noted in this post), and with my ego sufficiently boosted by writing a screensaver in VB that would display not only the pictures but the tags associated with them, it was a deflating experience to have my middle child, Aidan, pepper me with comments like “That’s not me; that’s Brandon” or “You didn’t include Grandpa in the tags, but I can see his ear in t...

Apr 6, 2009
Post comments count 0
Post likes count 0

Negative delays: not in VB (Lucian Wischik)

VBTeam

Our recent post on "negative sleeps in VB" was an April Fool's joke. VB doesn't have negative sleeps, and isn't going to. But the joke's on me! Several readers wrote back to say that other languages do have negative sleeps. Tony Hoare, inventor of "Quicksort" amongst other things, wrote: Did you know that negative delays have long been used in practice in the design of systolic circuits?  The negative delay is used to synchronise signals in the middle of the network, just like a positive delay.  There are a series of commutation laws that allow delays to be moved before or after a circuit element....

Apr 1, 2009
Post comments count 0
Post likes count 0

Using "negative sleeps" to improve responsiveness in VB web apps

VBTeam

[NOTE: please also read the followup to this article]  .NET 4.0 will introduce many new threading and concurrency classes -- SpinLock, Parallel Linq, and ConcurrentDictionary to name but a few.The new feature that excites me the most is the ability to pass a negative argument to Thread.Sleep. This article describes how you can use it to speed up a program by compensating for internet latency.Let's start with a simple VB program which retrieves an RSS feed and produces from it a new feed with only those items from a particular date of the year:Option Strict OnImports System.NetImports...

Mar 29, 2009
Post comments count 0
Post likes count 0

CodeCast Episode 12: Visual Basic and the VB Community (Lisa Feigenbaum, Dustin Campbell)

Lisa Feigenbaum

Be sure to check out the latest episode of CodeCast with two VB interviews, including myself and VB program manager Dustin Campbell!Thursday, February 19, 2009 CodeCast Episode 12: Visual Basic and the VB CommunityIn this episode of CodeCast, Ken Levy, Markus Egger, and Gary Short discuss Internet Explorer 8, Windows 7 beta, Kindle and Sony eBook readers, and Visual Studio 2010. Ken has two in-depth interviews on the topic of Visual Basic, .NET languages, and the VB community. The first interview is with VB community program manager Lisa Feigenbaum and the second is with VB program manager Dustin Campbell.&mid...

Mar 27, 2009
Post comments count 0
Post likes count 0

Implicit Line Continuation in VB 10 (Tyler Whitney)

VBTeam

Things are always changing.  I was at the Washington State History Museum with my daughter a couple weeks ago.  One of the exhibits features pictures of various sites that were taken many years ago.  Then it contrasts them with contemporary pictures taken of the same locations.  It was really interesting how much things changed and how quickly. I have a couple computers in my office that I had when I was a kid.  My wife suggested that I move my little museum to a place where it would be more appreciated—which meant out of the house ;-)  So here they sit in my office.  I ha...