Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 192571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:26:13+00:00 2026-05-11T16:26:13+00:00

C# 4.0 introduces dynamic keyword, which will look up at run-time. Does this mean

  • 0

C# 4.0 introduces dynamic keyword, which will look up at run-time.

Does this mean we’ll need awkward reflection no more? If does, Can you show up an example of it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T16:26:13+00:00Added an answer on May 11, 2026 at 4:26 pm

    We’ll still have Reflection – using ‘dynamic’ against regular CLR objects will invoke a Reflection-based dispatcher.

    So – we’ll still have Reflection, but it’ll be easier to do.

    Here’s an example:

    // Via 'dynamic'    
    dynamic dx = GetSomeCLRObject();
    dx.DoSomething();
    dx.SomeMember = 2;
    
    // Via Reflection
    object x = GetSomeCLRObject();
    Type xt = x.GetType();
    MemberInfo DoSomethingMethod = xt.GetMethod("DoSomething");
    DoSomethingMethod.Invoke(x, null);
    PropertyInfo SomeMemberProperty = xt.GetProperty("SomeMember");
    SomeMemberProperty.SetValue(x, 2);
    

    I don’t know about you, but I like the former. =)

    In both these cases, I get no compile-time checking, no Intellisense, no IDE support – but the former case is much more expressive than the latter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The dynamic keyword in C# 4 introduces new ways to work with objects that
pls tell me in which version dynamic keyword is introduced ? I found strange
More information from the Perl 6 Wikipedia entry Junctions Perl 6 introduces the concept
Some people have argued that the C# 4.0 feature introduced with the dynamic keyword
So, C# 4.0 came out yesterday. It introduced the much-debated dynamic keyword, named and
I watched a little introduction into ASP.NET Dynamic Data, and I noticed this option
I need an algorithm that introduces data like a stack, so when I scan
I'm wondering which Linux distribution would be best (i.e. introduces the least dependencies) when
Why in interpreted languages the # normally introduces a comment? This question was asked
I use PHP 5.3, which introduces closures. Because I now have closures available throughout

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.