jaredpar's WebLog

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

    IEnumerable and IEnumerable(Of T)

    • 4 Comments
    IEnumerable(Of T) is a huge step up in the 2.0 framework from the original IEnumerable interface. It provides a typed enumeration which eliminates lots of nasty casts. The best part is that IEnumerable(Of T) is backwards compatible with IEnumerable (it...
  • jaredpar's WebLog

    .Net Framework Source Code

    • 1 Comments
    If you haven't heard the news yet, you can read the full article on ScottGu's Blog . In summary Microsoft has released the source code for the .Net Framework in such a way that you can step into the Framework while debugging. IMHO this is great for users...
  • jaredpar's WebLog

    Casting to an Anonymous Type

    • 4 Comments
    This discussion is building upon a previous post on how to acquire an anonymous type ... type . The next question is, how can you cast an arbitrary object into an anonymous type? At a glance this doesn't seem possible as you cannot directly express...
  • jaredpar's WebLog

    Customizing Displays in the Debugger for System Types

    • 1 Comments
    We've heard feedback from several customers regarding the way certain types are displayed in the Debugger. Many of the displays exist to maintain the user experience between versions of Visual Studio. We constantly evaluate if this is the correct choice...
  • jaredpar's WebLog

    C++ Literal Number Grammar

    • 1 Comments
    Recently I was investigating a bug and ended up investigating the possible values of C++ literals for char and number types. The following page has a very useful and detailed grammar of C/C++ literals that came in handy. http://cpp.comsci.us/etymology...
  • jaredpar's WebLog

    Testing your code

    • 1 Comments
    This is a little off topic from my typical purely technical discussion. I'm a huge advocate of automated code verification. Unit testing is preferred but really any method is acceptable as long as it gets the job done of testing your code. IMHO, testing...
  • jaredpar's WebLog

    C# Keyword Identifiers

    • 1 Comments
    This falls into the "learn something new everyday but not necessarily entirely useful bucket". An app I spend a bit of time on leverages the CodeDom heavily to spit out managed code. While running through some test cases the other day I noticed that it...
  • jaredpar's WebLog

    Singleton Pattern

    • 3 Comments
    Quite awhile back I posted about how to create a re-usable singleton pattern in .Net. Link is here . A bit of time has passed and I've altered the pattern a bit. The reasons for the change are some new type inference patterns and FxCop cleanliness. ...
  • jaredpar's WebLog

    DebuggerNonUserCode and Properties

    • 1 Comments
    DebuggerNonUserCode is an attribute that tells the debugger that the target item is not code typed by the user. It can be added to classes, structs, methods, constructors and properties. The benefits of this attribute is that it allows the compiler and...
  • jaredpar's WebLog

    C++ Frustration: Unions and Constructors

    • 2 Comments
    Using PreFast internally we recently came across a class of bugs. In several places we were using uninitialized structures as local variables. The error came about because the types in question had no default constructor. For instance take the following...
  • jaredpar's WebLog

    C# Type inference change for Orcas

    • 5 Comments
    While playing around with a batch of Orcas code recently I found a welcome change to the C# type inference rules for Orcas. The return type of a generic delegate can now be inferred from the actual return values. Here is some sample code demonstrating...
  • jaredpar's WebLog

    Closures in VB Part 6: Limitations

    • 0 Comments
    For previous articles in this series please see ... Part 1: Introduction Part 2: Method Calls Part 3: Scope Part 4: Variable Lifetime Part 5: Looping As powerful as closures are in the language they do have a few limitations. We worked hard in Orcas to...
  • jaredpar's WebLog

    PowerShell Simple Tricks: Number to Hex

    • 0 Comments
    When investigating bugs a lot of times you start out with an unfamiliar HRESULT value. Searching the web will give you a hint of what the problem is and the real search can begin. If you get this error out of a log file it can come in a base 10 value...
  • jaredpar's WebLog

    Expression Evaluator Sample Released

    • 0 Comments
    The new version of the Visual Studio 2008 Beta2 SDK was just released. Among the many new samples is a basic expression evaluator sample. This sample shows you how to add basic debugger support to a managed language in Visual Studio. This is the first...
  • jaredpar's WebLog

    Detecting if you are an Admin

    • 0 Comments
    This came up on an internal alias. A customer wanted to know how to determine if there were running as an admin in a tool. Below is a sample program that will print out whether or not you are the machine admin or a member of the machine administrators...
  • jaredpar's WebLog

    Coding Quiz: Anonymous Type Types

    • 3 Comments
    Question: How can you create a variable in VB which is typed as an anonymous type but not actually create an instance of that type? Answer in comments. Note, doing this is not particularly useful it came about while I was playing around with a feature...
  • jaredpar's WebLog

    IMetaDataImport::GetParamForMethodIndex

    • 0 Comments
    While investigating a recent bug I found about an interesting return for GetParamForMethodIndex. On a perfectly verifiable assembly, a call to GetParamForMethodIndex was returning a failure code. After some searching I found the return code was CLDB_E_RECORD_NOTFOUND...
  • jaredpar's WebLog

    Closures in VB Part 5: Looping

    • 2 Comments
    For previous articles in the series please see Part 1: Introduction Part 2: Method Calls Part 3: Scope Part 4: Variable Lifetime Once again sorry for the long delay between posts. Looping structures can cause unintended consequences when used with Lambda...
  • jaredpar's WebLog

    Closures in VB Part 4: Variable Lifetime

    • 2 Comments
    For previous articles in this series please see Part 1: Introduction Part 2: Method Calls Part 3: Scope Sorry for the long delay between posts here. We're getting Orcas out the door and getting this series completed takes a back door to shipping. Originally...
  • jaredpar's WebLog

    Defining Guids

    • 1 Comments
    One of the tasks I find to be annoying during development is pasting GUID's into my code. You need GUID's for lots of different functions (COM, Constants, etc ...). GuidGen is a good tool for getting the Guid into your code. However I don't insert GUID...
  • jaredpar's WebLog

    Expression Evaluator SDK

    • 0 Comments
    The Expression Evaluator is a VSIP component that allows Visual Studio Languages to plug in a Debugger. It's what controls the information inside the locals,watch,auto, stack frame and immediate windows during a debugging session. Both VB and C# use this...
  • jaredpar's WebLog

    Closures in VB Part 3: Scope

    • 3 Comments
    For previous articles in this series please see Part 1: Introduction Part 2: Method Calls Thus far in the series we've only lifted variables that are declared in the same block/scope. What happens if we lift variables in different scope? The answer is...
  • jaredpar's WebLog

    Closures in VB Part 2: Method Calls

    • 9 Comments
    For previous articles in this series, please see Part 1 - The basics This part of the series will focus on how method calls are handled in closures. As stated in the previous article, the purpose of closures is to allow all operations inside a lambda...
  • jaredpar's WebLog

    Closures in VB: Part 1

    • 7 Comments
    One of the features I implemented for VB 9.0 is lexical closure support. This a great addition to the VB language and I wanted to do a series of blog posts to describe this feature and how it will impact your code. Lexical Closures (more often referred...
  • jaredpar's WebLog

    CoSetProxyBlanket and Managed Code

    • 0 Comments
    When running FxCop on any managed code that uses CoSetProxyBlanket you will see an error message saying the method cannot be called reliably from managed code. I've hit that message before was frustrated by my attempts to find an explanation on the web...
Page 10 of 13 (321 items) «89101112»