Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

The const keyword#

Sumit Rawal answered on July 1, 2023 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • c# const
  • const in c#
  • const {}
  • for const

  • The const keyword#

    0

    The const keyword modifies values. This means whenever we have an object, variable, widget, etc., we know that its underlying value or state won’t change.

    To have a better understanding of const is to think in a way that const object values can be calculated at compile time. For example, 1+2 will always be equal to 3, and this fact cannot be changed. But on the other hand, the DateTime.now() function will return a different DateTime on every single function call, even if there is a difference of a nanosecond from the previous DateTime.now() function call, and hence, it is dependent on runtime. 

    Popularity 3/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: whatever
    Link to this answer
    Share Copy Link
    Contributed on Jul 01 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.