Long vs Int

NdabeNdabe Durban

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


  • Depending on the account number value.

    Int is 32 bits or 4 bytes. Can store value from 0 to 4 294 967 295 for unsigned (uint).
    Long is 64 bits or 8 bytes. Can store value from 0 to 18 446 744 073 709 551 615 for unsigned (ulong).

  • NdabeNdabe Durban

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

Sign In or Register to comment.

Howdy, Stranger!

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