Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1028095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:20:05+00:00 2026-05-16T12:20:05+00:00

hi all i am confused const long size =((long)int.Maxvalue+1)/4 how i interprate it… and

  • 0

hi all i am confused const long size =((long)int.Maxvalue+1)/4 how i interprate it…
and what will happen when we define static const long size =((long)int.Maxvalue+1)/4…
what is readonly member….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:20:05+00:00Added an answer on May 16, 2026 at 12:20 pm

    const

    A constant member is defined at compile time and cannot be changed at runtime. Constants are declared as a field, using the const keyword and must be initialized as they are declared. For example;

    public class MyClass
    {
      public const double PI = 3.14159;
    }
    

    can’t declare a member of class as “static const”.

    • Because member variables declared as “const” are already “static”.

    PI cannot be changed in the application anywhere else in the code as this will cause a compiler error.

    readonly

    A read only member is like a constant in that it represents an unchanging value. The difference is that a readonly member can be initialized at runtime, in a constructor as well being able to be initialized as they are declared.
    For example:

    public class MyClass
    {
      public readonly double PI;
    
      public MyClass()
      {
        PI = 3.14159;
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a bit confused about the size of my App! The folder and all
I'm confused as hell with all the bazillion ways to read/write/create excel files. VSTO,
I´m a little bit confused by reading all the posts and tutorials about starting
I'm a bit confused about the use of all the IEnumerable<T> extension methods, intellisense
i am a bit confused on how to display all the items in session
I'm kind of confused. I would put all the HTML for the menu in
I'm very confused by the MSDN samples. And all the samples I find generally
i am very confused please help to clarify these differences! are they all completely
I am little confused... Is it true that reading\writing from several threads all except
It is mentioned in ftok() manual key_t ftok(const char *pathname, int proj_id); The ftok()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.