In C#, int, Int32, and Int64 are all numeric data types that can hold integer values, but they differ in their range and memory usage. This cause bugs and performance issues into the code. In this article, I would like to explain the different behavior of integer type.
FCL stands for Framework Class Library. It is a collection of pre-built classes and data types that are provided by the .NET Framework. The FCL includes a variety of data types that are used to represent different types of data, such as integers, strings, dates, times, and more.
The below points defines the diffrence between int, int16, int32 and int64 datatypes.
Example
int checkInt = 20; // This is a 32-bit integer
Int16 checkInt16 = 30; // This is a 16-bit integer
Int32 checkInt32 = 40; // This is the same as 'int'
Int64 checkInt64 = 50; // This is a 64-bit integer
// Add the values together and store in a new variable
Int64 result = checkInt + checkInt16 + checkInt32 + checkInt64;
// Display the result
Console.WriteLine("Result: " + result);