Browse by Tags

Tagged Content List
  • Blog Post: How can I get objects and property values from expression trees?

    This is a follow-up to the Getting Information About Objects, Types, and Members with Expression Trees post, so I would recommend that you read that one first. Among other code examples in that blog post, I demonstrated how you can get a property name as a string by using expression trees. Here is the...
  • Blog Post: What is the difference between “dynamic” and “object” keywords?

    Let’s take a quick look at the object keyword first. I’m not going to talk a lot about it because it’s been around since C# 1.0. This keyword is nothing more than a shortcut for System.Object , which is the root type in the C# class hierarchy. (However, as Eric Lippert pointed out in his blog post, not...
  • Blog Post: Getting Information About Objects, Types, and Members with Expression Trees

    Starting with C# 3.0 and Visual Studio 2008, you can use expression trees to get information about objects, types, and members. In this post I’m going to show some examples and explain what benefits you can get by using this technique. If you are not familiar with expression trees, I would recommend...
  • Blog Post: Dynamic in C# 4.0: Creating Wrappers with DynamicObject

    In the previous post I showed how you can use the new dynamic feature and the ExpandoObject class to add and remove properties at run time, and how this can make your code more readable and flexible than code written with LINQ to XML syntax. But there were some obvious flaws in that example: While...
Page 1 of 1 (4 items)