Long vs Int - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Long vs Int

NdabeNdabe DurbanPosts: 3Member
in C#

Is there a problem if I use int for storing an account number instead of long?

Best Answer

Answers

  • NdabeNdabe DurbanPosts: 3Member

    Thanks, I'm new to C# so this was helpful

  • mohitkumarmohitkumar indiaPosts: 14Member

    Int is 32 bit integer having the capacity of storing 4 byte of memory and minimum value which can supply to int is -2147483648; and max value is 2147483647;

    Similarly long is 64 bit integer having the capacity of storing 8 byte of memory and minimum value which can supply to int is -9223372036854775808 and max value is 9223372036854775807

    for similar kind of questions in c# you can refer this link c# interview questions

Sign In or Register to comment.