Renu Agarwal
Can the value of dynamic type variable be changed at runtime?
By Renu Agarwal in .NET on Jun 16 2016
  • Renu Agarwal
    Jun, 2016 16

    Yes. Dynamic type variable are run time variables which means that their value and type are defined at run time. Also, it is not necessary for a dynamic type to be initialized at complile time.The below code snippet gives more insight about dynamic type variable:dynamic var1 = "Hello"; //Here,the data type of variable var1 is string. var1 = 1; //Now, the data type of vairable var1 is changed to int.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS