• Sam Ng's Blog

    The Pain of deploying Primary Interop Assemblies

    • 4 Comments
    Alright, first of all, what are Primary Interop Assemblies (PIAs), and why am I devoting an entire post to the pains caused by deploying these things? And secondly, how do they relate with what we’ve been talking about thus far? The answer to the second...
  • Sam Ng's Blog

    Channel 9: Dynamic in C#

    • 0 Comments
    Not too long ago, I did another Channel 9 video on Dynamic in C# with another compiler dev, Chris Burrows. In this video, we discuss the making of dynamic, as well as some of the drawbacks, design decisions, and philosophies behind the feature. Enjoy...
  • Sam Ng's Blog

    Com interop in C# 4.0: Indexed Properties

    • 1 Comments
    One of the things I love about my job is that I get to make people happy. How do I do that? By giving them what they want of course! One of the things I don’t like so much about my job is going back on a decision that we made before, and having to revert...
  • Sam Ng's Blog

    COM Interop in C# 4.0

    • 12 Comments
    Wow, it’s been a while since I’ve last posted! Don’t worry, I’m still alive and kickin’, and we’re still workin’ on cool stuff for y’all to use. Let’s take a bit of a recap of how far we’ve come. We’ve chatted about dynamic binding in C# and how that...
  • Sam Ng's Blog

    Named and Optional arguments – ties and philosophies

    • 3 Comments
    Okay, my attempt at a clever title failed… Ties and Philosophers? I oughtta stick with technical writing. :) We’re almost done with our chat about named and optional arguments. We’ve covered what the feature is about , and covered overload resolution...
  • Sam Ng's Blog

    Named arguments and overload resolution

    • 6 Comments
    Last time we talked about the basics of named arguments, optional arguments, and default values . From here on out, I’m just going to refer to the whole feature group as “named and optional arguments” – it’s just too much typing otherwise (we actually...
  • Sam Ng's Blog

    Named arguments, optional arguments, and default values

    • 30 Comments
    C# 4.0 introduces the concept of optional parameter values into the language. Now, this has been a controversial subject in the past, and we have had many requests for the feature, but have traditionally stayed away from it. So, why now? Well, before...
  • Sam Ng's Blog

    Dynamic in C# VII: Phantom Method Semantics

    • 2 Comments
    By now, my hope is that you all have a well-rounded view of dynamic. We started this series by introducing dynamic and talking about the basics of the feature , and have just finished talking about some of the feature's limitations with the intent that...
  • Sam Ng's Blog

    Dynamic in C# VI: What dynamic does NOT do

    • 15 Comments
    As I mentioned last time , there are a few gotchas that we'll need to look at in order to get a full understanding of the dynamic feature and its capabilities. Today we'll take a look at some of those limitations. As we go along, I'll try to shed some...
  • Sam Ng's Blog

    Dynamic in C# V: Indexers, Operators, and More!

    • 4 Comments
    Now that we're all experts in how dynamic invocations work for regular method calls, lets extrapolate from our previous discussion about phantom methods a bit and take a look at how those basic concepts apply to other dynamic operations. Today we'll just...
  • Sam Ng's Blog

    Dynamic in C# IV: The Phantom Method

    • 6 Comments
    Yes, this does sound like a Star Wars movie, but no, I'm not a Star Wars geek that just likes to pull lines from my favorite movies (though I rather enjoyed Star Wars). This post will deal with what we've coined "the phantom method". It's the...
  • Sam Ng's Blog

    Dynamic in C# III: A slight twist

    • 3 Comments
    Last time we dealt with the basics of dynamic binding . This time, we'll add a small twist. First, lets recall the example we were using last time: static void Main( string [] args) { dynamic d = 10; C c = new C(); // (1) Dynamic receivers. ...
  • Sam Ng's Blog

    Channel 9!

    • 1 Comments
    A few weeks ago, a few of us on the compiler team did a Channel9 interview, discussing some of the new features that we're working on and how they fit into the whole Visual Studio 2010 story. The video is now online ! In it, we talk in quite length about...
  • Sam Ng's Blog

    Dynamic in C# II: Basics

    • 15 Comments
    Last time , we began to dive into dynamic binding in C# and what happens through the pipeline. This time, we'll take a simple scenario and pick apart the details of what happens under the covers, both during compile time and runtime. We can break down...
  • Sam Ng's Blog

    Dynamic in C#

    • 23 Comments
    The other day I was playing around with some office code, and I found myself writing a lot of code much like the following sample that Anders used at his PDC talk : static void Main( string [] args) { var xl = new Excel .Application(); (( Excel...
  • Sam Ng's Blog

    Microsoft Visual Studio 2010

    • 3 Comments
    The cat's out of the bag! Hours ago at PDC '08 , I got to watch Anders unveiled the new C# 4.0 language features that we've been working on. This unveiling was accompanied by some fantastic demos of our work in action. Even though I've been working on...
  • Sam Ng's Blog

    So-cal CodeCamp 08!

    • 0 Comments
    I got the opportunity to give a talk at the SoCal CodeCamp 08 this past weekend, and its driven me back to blogging. Its been just over 8 months since my last post - these 8 months have been spent with my head down working on Visual Studio 2010 , the...
  • Sam Ng's Blog

    Optional Modifiers and Overload Resolution

    • 3 Comments
    Optional Modifiers (or modopts ) are CLR constructs that allow types to be annotated with optional information. This allows compiler writers to annotate their types with additional information that may not have a direct CLR representation. The managed...
  • Sam Ng's Blog

    Generic Method Substitutions and Unification - Part two

    • 2 Comments
    Last time we talked about generic method substitutions which resulted in types being declared with more than one method with identical constructed signatures. After thinking long and hard about this problem, we've come to a conclusion as to how to resolve...
  • Sam Ng's Blog

    generic method substitutions and unification

    • 6 Comments
    It's been a while since I've last written - my apologies. We've been hard at work figuring out what the next release of C# will look like, and I'm happy to say that I'm very excited about what we're working on. Great minds are at work figuring out things...
  • Sam Ng's Blog

    VS 2008 is out the door!

    • 1 Comments
    On December 19th, we officially announced that VS 2008 is released to manufacturing! This is the first release of the product (of any product for that matter) that I've worked heavily on, so I'm quite anxious to see the feedback on the work that we've...
  • Sam Ng's Blog

    Virtual Events in C#

    • 3 Comments
    Technorati Tags: Events One of the things that the language designers considered when designing the C# language was the ability to notify external callers of certain events happening. To solve this problem, they (surprise surprise) introduced the event...
  • Sam Ng's Blog

    Local variable scoping in C#

    • 7 Comments
    In my previous post, Compiler-generated scopes for local variable declarations , I briefly touched on the issue of multiple meanings applied to the same name. In this post, I'll aim to flush out the compiler's rules with regards to binding names in their...
  • Sam Ng's Blog

    Compiler-generated scopes for local variable declarations

    • 6 Comments
    I was tasked with understanding and fixing a bug on error reporting with foreach iteration variables the other day, and it got me thinking about local variable scoping rules in C# in general. First, the bug. The Bug Consider the following code: class...
  • Sam Ng's Blog

    Another compiler dev

    • 0 Comments
    Hi there. My name is Sam Ng, and I'm a developer on the C# compiler team. This here's my little outlet of random stuff that I think about, and things that I learn as I dig deeper into the wonderful world of software. Who am I? I'm currently a developer...
Page 1 of 1 (25 items)