Readonly vs. const?

Answer Posted / j_baghla

Both are used for constant values but in readonly variable
we can assign the value thru expression but we can't assign
value to constant variable thru expression.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is linq?

588


What is meant by localization?

637


What is the difference between override and overload in a method?

535


  • Accomm
  • i have this code.now on server side i want to compare this id(Accommodation) value and want id i.e.Accommodation.visible=true;

    1386


    Tell about your technical profile ?

    3106






    Difference between user groups and code groups

    1894


    Explain about Behavioral design pattern?

    636


    What is the advantage of .net?

    541


    What is namespace in .net?

    602


    What is a metadata in .net?

    568


    Explain about .net assemblies?

    615


    Explain the difference between asp.net & vb.net and explain architecture?

    544


    Explain the main components in .net?

    567


    How do we access crystal reports in .net?

    594


    Using com component in .net?

    602