jaredpar's WebLog

Code, rants and ramblings of a programmer.

Browse by Tags

Tagged Content List
  • Blog Post: Interesting Late Binding Scenario with ToString

    Not to long ago I received an email from a customer who wanted to report a bug in the VB.Net debugger.  They believed that there was a bug invoking ToString on Integer types in the immediate window and provided the following sample as evidence i = 100 ? i 100 {Integer} Integer: 100 ? i.ToString...
  • Blog Post: Why the debugging difference between C# and VB.Net return values?

    A feature which seems to be getting more requests recently is support for seeing the return value of a function in the debugger without the need to assign it into a temporary. C++’s had this feature for some time but it’s been lacking in managed debugging scenarios. James Manning recently...
  • Blog Post: Advanced Multitargeting in VB.Net

    Multi-targeting is a feature introduced in Visual Studio 2008 which allows developers to use new versions of Visual Studio to target earlier versions of the .Net platform.  It allowed users to target both the new 3.5 and 3.0 and the previous 2.0 profile with the same IDE.  Visual Studio 2010...
  • Blog Post: Why is LINQ absent from debugger windows (Part 2)?

    Some readers may remember an article I published almost half a year ago about LINQ being absent from the debugger windows.  That post explored the initial design of the feature, it’s limitations and ultimately why it was absent but promised a future article on a slightly different approach. ...
  • Blog Post: Nothing is private in the debugger (part 2)

    In a previous post I discussed how accessibility is ignored when evaluating expressions in the debugger and the unexpected scenarios that it creates.  One case I neglected to mention in that article is how this behavior works with the VB late binding engine.  The expression evaluator only relaxes...
  • Blog Post: Nothing is private in the debugger

    The goal of the debugger is to provide rich inspection capabilities for a process.  The main method of inspection is through the evaluation of textual expressions which is handled by a language specific component known as the expression evaluator . This component is the data provider for a good...
  • Blog Post: The many cases of ByRef

    One of the overlooked or simply misunderstood features of the VB language is calling a function which has a ByRef parameter.  Most languages support only a single method of passing parameters by reference [1], that is the scenarios directly supported by the CLR.  The CLR has a lot of restrictions...
  • Blog Post: Dev Connection Talk Slides and Code

    Thanks to everyone who attended my sessions at Dev Connections.  I’ve posted the material for both of my talks on my SkyDrive account.  This includes the slides and projects. http://cid-dc25b20f65f628f8.skydrive.live.com/browse.aspx/Public/DevConnections2009 Please let me know if you have any...
  • Blog Post: Speaking at Dev Connections in Las Vegas Next Week

    Next week I will be speaking at Dev Connections in Las Vegas.  I will be running the following sessions VMS02: Future Directions for Visual Basic VMS04: Microsoft Visual Basic IDE Tips and Tricks Both of these talks will spend a bit of time talking about all of the progress and exciting new features...
  • Blog Post: Why is LINQ absent from debugger windows?

    As the owner of the VB.Net portion of the overall debugging experience, I frequently hear the request from customers to add LINQ support into the Watch / Immediate and Locals window. Virtually every other type of expression is available in the debugger windows so why leave one of the most popular ones...
  • Blog Post: Extension Methods and ByRef targets

    One of the seldom used, and often unknown, features of VB extension methods is that the argument of the extension method (the first parameter) can be passed by reference.  This gives extension methods the power to change the reference that was used to invoke the value!  Obviously this can produce...
  • Blog Post: Properly handling a WinForms Timer event

    The WinForms Timer class allows the user to perform a particular action at a set interval.  Timer objects fire a Tick event at the set time which users can easily respond to.  This is very useful if a developer wants to check for a particular condition say every 2 seconds ( for the remainder...
  • Blog Post: VB Catch ... When: Why so special?

    The VB Catch syntax has a particular feature not present in C#: 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 ex As Exception When...
  • Blog Post: First MSDN article

    The August issue of MSDN magazine will be carrying an article I wrote this spring.  In it I toy around with using the deferred execution and lazy evaluation properties of LINQ to create more responsive UI code.  You can view the article here .  As usual I appreciate any feedback you have...
  • Blog Post: Making Equality easier

    Recently I've done a bit of posting about the difficulties of properly implementing equality in VB (and DotNet in general). While most of the problems can be fixed with a standard snippet the one really hard to implement issue is GetHashCode(). The rules for GetHashCode() are both simple and seemingly...
  • Blog Post: Equality isn't easy

    After my recent postings on the rules of Equality , I thought it would be a good idea to post a simple example of equality. The class in question, Example, has only one field of type Integer name m_field1. Two instances of Example are equal if m_field1 has the same value. So the real equality check is...
  • Blog Post: IEquatable(Of T) and GetHashCode()

    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...
  • Blog Post: Properly Implementing Equality in VB

    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...
  • Blog Post: Me, MyBase, MyClass and MyPost on the subject

    Recently we had a good discussion on an internal alias about the use of Me, MyClass and MyBase in VB. Me, MyBase and MyClass are all ways to access instance member data in a VB class or structure. There was a little bit of confusion on the actual workings and meanings of the keywords in various contexts...
  • Blog Post: BinaryInsert Part2

    Previously I discussed a potential missing API in List(Of T).BinaryInsert. One of the items I mentioned was it had better performance because it was O(Log N) vs Insert and Sort which is O(NLogN). Several users correctly pointed out this was incorrect and that Insert() had the additional overhead of an...
  • Blog Post: Have a IComparable(Of T) but need an IComparer(Of T)?

    IComparable(Of T) is an interface saying "I can compare myself to other objects of the same type".  And IComparer(Of T) is an interface saying "I can compare two objects of this type.".  Often API's which need to perform comparisons will take an instance of IComparer(Of...
  • Blog Post: Missing API: List(Of T).BinaryInsert

    One API that seems to be missing from List(Of T) is a BinaryInsert method.  Especially since there is already a BinarySearch method. Binary insert is a method for inserting a value into an already sorted list.  Since the list is already sorted we can do a binary search to find the appropriate...
  • Blog Post: Dealing with Exceptions in a Future

    Besides waiting, the another important issue when dealing with Futures is how to deal with exceptions thrown by the user specified code.  Option 1: Ignore the Exception Don't take any actions in the future code and force users to write exception free code.  IMHO this is not the best way to...
  • Blog Post: Tuples Part 1

    A tuple in computer science can be described as a set of name/value pairs. In some cases it can be described as simply a set of values that are accessible via an index [1]. Previously I discussed how to create a Tuple inside of PowerShell . This series will focus on the use of Tuples in DotNet and how...
  • Blog Post: Getting my Fortune

    Fortune is a Unix command that gets a random message from a set of databases and displays it on the screen.  These messages have a wide variety but tend to be funny, quirky or famous quotes (most are indeed geeky).  Nearly all unix systems have a version of Fortune.  Windows doesn't have...
Page 1 of 2 (48 items) 12