/Home /Archive /Syndicate /Blog /Support /About /Contact  
All Visual Basic Feeds in one place!





This is a bit of a follow up to a previous post we discussed how to properly implement equality in VB.  Several users commented/asked that IEquatable(Of T) could be used in place of overriding Equals().  Since IEquatable(Of T)   doesn't define a GetHashCode() method the user didn't need to define it and hence run into all of the problems associated with GetHashCode() usage.  Unfortunately this is not the case.  Several parts of the framework link IEquatable(Of T ... [ read more ]
I have found myself explaining this in conference sessions so I thought I would write it down in my blog. Entity Framework has a Golden Rule. Though shalt not do nuttin' that the developer has not explicitly told you to do. The lack of implicit lazy loading is one of the more notable (and hotly contested by some) example of this. But one day when I was coding, Entity Framework did something that I did not ask it to do. I emailed Danny Simmons to tattle on the API. But Danny explained ... [ read more ]
Like Jeremy Miller, who has Transparent Lazy Loading for Entity Framework on his Christmas Wish List , Timothy Khouri does not like the fact that Entity Framework doesn't support Lazy Loading. However, since he really likes Entity Framework, he wrote some code that will enforce Lazy Loading for him. Entity Framework promises not to do anything you don't explicitly tell it to do, so Timothy found a way to keep telling EF to do this for him because that's what he wants. After looking at LIN ... [ read more ]


The Learn tab of the Visual Basic Developer Center  is being updated with a bunch of new content and VS 2008 topics. If you look at the center of the page you'll see the list of topics and when you click one, you should now see some fresh stuff. Currently there's over 200 items presented on the topic pages and we're adding more every week. Right now each of the topics are displayed in a fixed order by content type (i.e. Webcast, Video, Article, Blog, etc.) but we plan on ... [ read more ]
Prior to SQL Server 2008, SQLXML 4.0 was released with SQL Server and was installed by all SQL Server editions, except in SQL Server Express. Beginning with SQL Server 2008, the latest version of SQLXML is no longer included in SQL Server.   When SQL Server 2008 is generally available, the latest version of SQLXML will be SQLXML 4.0 SP1.   The URL for the site where you can install SQLXML 4.0 SP1 will be added to this blog entry, and to the SQL Server 2008 Books O ... [ read more ]
On page 216 of LINQ in Action , I made a comment that unmapped properties in a mapped class cannot be used in a LINQ to SQL projection. This was true with the beta bits, but only partially true with the release bits. To begin, let's consider the Author table we have in the book samples. The Author class has separate fields for the first and last name. Each of these is mapped to the corresponding fields in the Author table. In the book, we show how you can create a read only property in a ... [ read more ]
It's bad enough when the Windows Live team continually releases their SDKs omitting VB, but when XNA 3.0 CTP is released and STILL NO VB support, it's getting beyond a joke.  XNA 3 is for Visual Studio 2008 and lets you do cool things like create games for Zunes, unless of course you want to do that in VB.
Random musing for the day: I was thinking about reserved words in programming languages and whether they're really necessary at a lexical level. As you know, most programming languages define in their lexical grammar a set of words that cannot be used anywhere in the language except when explicitly specified in the grammar. For example, VB reserves the word "Object". So you can't just say: ' Error: Keyword is not valid as an identifier. Sub Object () End Sub Many langua ... [ read more ]


This post assumes you’ve read my previous Converting SQL to LINQ posts.   I haven’t had much in the way of specific requests for more LINQ posts, so I’d still welcome any suggestions that people want to offer.   I did get one request about how to mimic the LIKE keyword functionality in VB LINQ.   In SQL, the LIKE keyword compares a string field against a pattern and returns a Boolean value representing whether the string matches the pattern.   F ... [ read more ]
  One of the great things about WPF is its ability to let you use animation to enhance your user interface. (Or wreck it if you go too far!) In my opinion, subtle animations can go a long way towards improving the user experience.   One particular way is to fade colors in and out so that text seems to appear and disappear in a way that gives the impression of movement, but without any jarring visual effects.   Doing this in the XAML markup is well documented and ... [ read more ]
Entity Data Models have a lot of rules. They are necessary for the integrity of the model, though if you are not familiar with depth of EDMs and *why* these rules exist, many of the mapping rules may seem to make no sense when it comes trying to implement them. This gets hairy when you are mapping stored procedures. Roger Jenning's solution is to create stored procedures that will map properly, rather than suffer wtih the ones that already exist. The first level ... [ read more ]
The NHibernate FAQ has a new post about complex object graphs and lazy loading.  If you use NHibernate (or, ActiveRecord -- which makes NHibernate a whole lot easier), it's worth a look.  The technique described can greatly improve the way your app interacts with the database.  OR mappers are nice, but you need to make sure you understand what is happening with the database calls that are made automatically by your OR framework. If you're using ActiveRecord , here's ... [ read more ]
I was perusing Chris Williams' blog over on GeekswithBlogs.Net. I met Chris many years ago through INETA and in person at an INETA User Group Leader event. Chris ran the user group in Charleston, South Carolina and has since moved to Minnesota where he has survived his first winter with all of his fingers and toes intact. He is a really nice, unique and memorable guy (okay the tat's definitely help him stand out). While looking at his blog, I saw a post of photos from  a funny ad t ... [ read more ]
And I haven't even had a chance to look at any presentations yet. Here's what's on my schedule so far. Monday morning - speaker training Monday afternoon - INETA User Group Leader Meeting (yay!) Monday evening - Speaker dinner Tuesday 1-2: Vista Ask the Experts Booth demoing Annotation in Silverlight Wednesday Lunch: Women in IT Panel (yay) Wednesday 2:45: Birds of Feather "Is Entity Framework right for your application?" Wednesday 7pm: Birds of Feather with Steve S ... [ read more ]


It was pointed out to me recently that I've gotten a bit lazy with my coding. I completely blame it on implicitly typed local variables. Read more here... [A New DevLife Post]


WARNING: This is a speculative post . Caveat emptor. Well, I appear to be on a rhythm of about once a month posts, which seems OK for the moment. Moving on to another "future" topic, one of the most annoying things that we cut (at least, from my perspective) from VB 2008 was collection initializers. Collection initializers were a little different than the corresponding C# feature, because our plan was to introduce stand-alone initializers that didn't have any intrinsic type. Instead the in ... [ read more ]
  Veggie garden's ready in case I ever get ready. I did already put some lettuce and peas in on the left. Only super hardy stuff goes in now. We can't do our regular planting (tomatoes etc) until after Memorial Day. Short growing season in Vermont. Compost is ready and waiting. Lupine are coming up. They are SO hardy.There are hundreds of them in the front field. Looks amazing in early June! The front garden has already got ... [ read more ]
Last week, Bill Wagner and I were providing some C# training for one of our clients.  Bill showed the class how to use F12 to jump to the definition of a method.  One of the students asked how to go back to your previous position and Bill didn't know the key binding off hand. As someone who comes from a VB6 background, I've maintained my VB6 keyboard mappings since I moved to C# in 2003.  Navigating around inside the VS.NET IDE has been a no-brainer for me since all of the ke ... [ read more ]
I will be presenting on the VB IDE in Southern California this week at a series of user group meetings. The events will be held in the San Diego and the Los Angeles area . Charlie Calvert from the C# team will be flying down from Redmond to speak as well. The schedule is as follows: May 6, 6:00 PM: San Diego, http://sddotnetdg.org/ May 7, 6:30 PM: Irvine, http://www.ocdotnet.org/ May 8: 6:30 PM: Torrence, http://www.southbaynet.org/south ... [ read more ]


ClickOnce Deployment A recent post on vbCity regarding deploying an application with ClickOnce got me wondering about doing deployment with ClickOnce. I have always done deployment of applications by creating and using a Setup and Deployment package which created a .msi installer file, so it was interesting to see some of the differences between the two distribution methods. First off I created a simple application to test the ClickOnce distribution and installation method with.  ... [ read more ]


Recipe 3 showed one way to work with mixed XML content using the XML Descendant axis property and the ReplaceWith method. This is one way to do an identity transform and we’ll look at another method in a later post. There is a key capability not mentioned in Recipe 3 that you will need for fully-functioning identity transforms. That is the concept of copying the inner XML of an element. You get the inner XML of an element from the Nodes property. Recipe 3 transformed ... [ read more ]
Relaxed delegate conversion, introduced in Visual Basic 2008, enables you to assign subs and functions to delegates or handlers even when the signatures are not identical. Therefore, binding to delegates becomes consistent with the binding already allowed in method invocations.  In Visual Basic prior to 2008: Sub OnClick (ByVal sender As Object, ByVal e As EventArgs) Handles RunButton.Click     MessageBox.Show("Visual Basic prior to VB 2008") End Sub ... [ read more ]
I needed to find out exactly what was being submitted by DataContext.SubmitChanges and didn't want to use SQL Profiler. I ran across this post by Kris Vandermotten and have converted the code to VB for anyone else who may need it. This is now always in my Utility.vb file that gets attached to most of my projects.   Imports System.Diagnostics Imports System.Globalization Imports System.IO Imports System.Text ''' <summary> ''' Implements a <see cref=" ... [ read more ]
The session I did last November at QCon in San Fransisco is online so check it out . In this talk I introduced VB 9's LINQ to XML syntax and XML literals, axis properties, and embedded expressions.   It's so weird watching myself but I think it was a pretty good presentation even though I was fighting a cough. I use my hands a lot (so unlike me <g>) but I think that helps express my points. That's my story and I'm sticking to it. ;-) I'll probably do even more ... [ read more ]


Visual Web Gui is an open source product for porting .NET Windows Forms applications to the web.  It is used to create ASP.NET web applications with a very AJAX like experience - without the AJAX programming hassle. It may be worth it to you to give it a try. Though it's little rough around the edges at this point, this product can be used today to produce web applications from .NET Windows Forms projects. And - the developer is rapidly improving the product each mo ... [ read more ]


Today I answered a question saying use A XOr (A And B).  Then I thought, well isn't that the same as A And Not (A And B).  Now I knew there is a simplification because of the double A and both And's but I honestly couldn't remember all my boolean algebra back from my circuits days. (seems I just don't use it that much <g>).  So for my own reference, I've got my "Circuits, Devices and System" text book out, and I'm going to attempt to transl ... [ read more ]
EntityStateObjects, to me, are one of the most important little pieces of the EF puzzle. IT is the EntityStateObject that maintains all of the critical info for change tracking. But it's hard to get the big picture of what's going on in there when debugging because all of the important stuff is delivered through methods, not properties. I wanted so badly to write a debugger visualizer for them but they are not serializable (big pout) so instead, I wrote an extension method that uses a Cond ... [ read more ]


Many developers want to implement equality functions for their objects.  DotNet made equality a deep part of the framework and added support all the way up to System.Object with Equals and GetHashCode .   In addition to the strongly enforced method semantics of GetHashCode and Equals there are also several other hard to enforce patterns that developers must follow in order to properly integrate into the rest of the DotNet framework.  We'll explore those rules today. B ... [ read more ]



Forum Discussions
.NET / .NET Newbies
.NET / .NET General
.NET / .NET 2005
.NET / VB.NET
.NET / C#
.NET / ADO.NET & XML
.NET / Reporting.NET
.NET / ASP.NET
Visual Basic 6 / VB6 Newbies
» Delete
Visual Basic 6 / VB6 General
Visual Basic 6 / VB6 Controls & ActiveX
Visual Basic 6 / VB6 & Databases
Visual Basic 6 / VB6 & Reporting
Visual Basic 6 / VB6 & WinAPI
Visual Basic 6 / VB6 & Web Development
Visual Basic 6 / VBA
Visual Basic 6 / eMbedded Visual Basic
Visual Basic 6 / Graphics, Games, Multimedia
© 2005 Serge Baranovsky. All rights reserved.
All feed content is property of original publisher. Designated trademarks and brands are the property of their respective owners.

This site is maintained by SubMain(), a division of vbCity.com, LLC