jaredpar's WebLog

Code, rants and ramblings of a programmer.
Posts
  • jaredpar's WebLog

    Extension Methods without 3.5 Framework

    • 10 Comments
    For a time I've been avoiding extension methods. Not because I'm opposed to using them but because of the 3.5 Framework. A lot of the tools I own are designed to be very light weight tools that only require the user to have 2.0 installed on their machine...
  • jaredpar's WebLog

    Tuples in PowerShell

    • 6 Comments
    Tuples in computer science are usually light weight record objects with simple name value pairs. In scripting languages it is very handy to create them on the fly. For quite some time I was using associative arrays in PowerShell to do just that. PS>...
  • jaredpar's WebLog

    AutoSize and DockStyle.Fill don't mix

    • 1 Comments
    The title of this post essentially says it all.  AutoSize and DockStyle.Fill don't mix well together.  Both properties exist to describe the size relationship relative to the rest of the control but they do so in conflicting ways. AutoSize is...
  • jaredpar's WebLog

    Calling Extension Methods on Null Objects

    • 1 Comments
    One of the gotchas for Extension Methods is that it's legal to call them on Null References. This isn't really surprising when you think about the feature. Boiled down to a fundamental level, extension methods are just syntactic sugar for calling a static...
  • jaredpar's WebLog

    Type Inference and IEnumerable

    • 2 Comments
    This is somewhat of a follow up on a previous post I did on the difference between IEnumerable(Of T) and the IEnumerable interfaces. I've seen several people type in the following code and wonder if there was a fundamental bug in the type inference code...
  • jaredpar's WebLog

    Names of Anonymous Type Members

    • 1 Comments
    Recently I was asked how can you get a list of anonymous type member names given a query of anonymous types. The quick answer is that you can use a quick bit of reflection to get back the names. Public Function GetAnonymousTypeMemberNames( Of T)( ByVal...
  • jaredpar's WebLog

    Lambda Unexpected Behavior

    • 1 Comments
    One item you strive to avoid when you design and implement a feature is unexpected behavior.  Unfortunately there is one case we couldn't avoid with Lambda's in VB9.  I just ran into the this problem when coding up a handler.  I wanted...
  • jaredpar's WebLog

    Piping elements of a String

    • 0 Comments
    Quick script that will allow you to pipe each char in a String into the PowerShell pipeline. function PipeStringChar() { param ( [string]$toPipe ) for ( $i = 0; $i -lt $toPipe.Length; $i++ ) { write-output $toPipe[$i] } } Alternatively...
  • jaredpar's WebLog

    VS2008 Ships

    • 1 Comments
    Orcas has shipped :) http://msdn2.microsoft.com/en-us/vstudio/default.aspx
Page 1 of 1 (9 items)

November, 2007