Difference between var and Dynamic Var in C#

Var
Dynamic Var
Firstly introduced in C# 3.0

Firstly introduced in C# 4.0
Var is Statically Type ( means  the type of variable declared is decided  by compiler at compile time )
Dynamic var is Dynamically typed (means the type of variable declared is decided by compiler at run time

Need to initialize at the time of declaration
No Need to initialize at the time of declaration


Difference between var and Dynamic Var in C# Difference between var and Dynamic Var in C# Reviewed by NEERAJ SRIVASTAVA on 9:56:00 PM Rating: 5

No comments:

Powered by Blogger.