Dynamic Vs Var in C#

Published: 26 July 2017
on channel: IAmTimCorey
61,972
1.9k

Newsletter signup (with exclusive discounts): https://signup.iamtimcorey.com/ (your email will be kept safe and you will not be spammed).
Facebook Page:   / iamtimcorey  

Want to see a full C# application built from scratch?
Check out this course: https://iamtimcorey.com/courses/cshar...

There is a lot of confusion around what the dynamic and var types are and when to use them. This video clears that up. Whether you need to know it for a job interview or just to use them properly, this video will show you what they are, why they exist, and when to use them.

0:00 - Intro
0:40 - basic difference explained
3:51 - dynamic auto type conversion and why not to use it
7:07 - examples of how dynamic may fail you at development and fail your application
15:05 - method return type
17:01 - why and when: dynamic
19:02 - why and when: var
24:57 - var as anonymous object and summary


Watch video Dynamic Vs Var in C# online without registration, duration hours minute second in high quality. This video was added by user IAmTimCorey 26 July 2017, don't forget to share it with your friends and acquaintances, it has been viewed on our site 61,97 once and liked it 1.9 thousand people.