New "dynamic" Keyword in C# 4

Instead of doing this:

object calc = GetCalculator();
Type calcType = calc.GetType();
object res = calcType.InvokeMember("Add",
    BindingFlags.InvokeMethod, null,
    new object[] { 10, 20 });
int sum = Convert.ToInt32(res);

Do this now:

dynamic calc = GetCalculator();
int sum = calc.Add(10, 20);

Thanks to Scott Hanselman by his post.


  1. It’s amazing in support of me to truly have a web site that is valuable meant for my knowledge.

  2. Changes even lessened the trouble style an incredible product to indicate search expression generate a web site that may be very relatively easy https://www.tmcnet.com/topics/articles/2019/03/12/441554-finding-right-provider-digital-seo-marketing.htm. Every person using a Search engine marketing firm is having been quite informed along with helpful. Advise them to search engine optimization help.

  3. If somebody wants expert take on the main topic of blogging next I advise him/her to go to this site, continue the fussy job.
    click site

  4. This written piece gives fastidious understanding yet.It’s amazing in support of me to truly have a web site that is valuable meant for my knowledge
    UX consultant

  5. It’s amazing to visit again n again coming to your blogs the superb effort is here.
    Lead conversion system squared

  6. Thanks meant for sharing this type of satisfying opinion, written piece is fastidious, that’s why I’ve read it completely.
    Ministry of Freedom Jono Armstrong

  7. The team also works on improving the niche edit services site's visibility and increasing their organic traffic.

  8. They matched their schedule to the local time, which allowed the developers to resolve issues as they came up.
    best logo companies

  9. You have touched good quality points here. In whatever way continue writing.
    UI design company