Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is the difference between keywords ‘var’ and ‘dynamic’ ?

user-image
Question ajoutée par Mohannad Bakbouk , Full Stack Web Developer , Almohtaseb
Date de publication: 2016/10/19
Nouran Adel
par Nouran Adel , IT Engineer , Export Development Authority

   var in .NET 3.5

dynamic in .NET 4

Khuram Nawaz Khayam
par Khuram Nawaz Khayam , Software Desing and Development Engineer , Fiverr

var is a keyword that lets the compiler to choose correct type prior to starting the debugging. while dynamic is a static type keyword that chooses the type runtime.

محمد جمال
par محمد جمال , Senior .Net C# Web Developer , JIC

var: All the methods, property or any other information are available at compile time and dynamic in run time only

mohamed mursheed
par mohamed mursheed , IT Manager , Hotel Sunrise Groups

Variables declared with var are implicitly but statically typed. Variables declared withdynamic are dynamically typed. ... When using the 'varkeyword, the type is decided by the compiler at compile time, whereas when using the 'dynamic'keyword, the type is decided by the runtime

Umair Khan
par Umair Khan , Web Developer , Innovative Designers

In var type compiler will specify its type at compile time. and dynamic type checks will be performed during runtime not by the compiler.

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?