1. Numeric Type (Int32 Type)
The Int32 type is used when dealing with whole numbers (excluding decimals). It is primarily used for performing calculations.
2. Calculations Using Variables
When performing calculations with variables, the result can vary greatly depending on the type of the variable.
Example:
For Int32 Type (Numeric Type):
1 + 1 = 2
When calculations are performed between numeric types, they are treated as numbers and calculated numerically.
For String Type (String Type):
"1" + "1" = "11"
When calculations are performed between string types, the strings are concatenated rather than added numerically.
As demonstrated:
- Int32 Type performs numerical calculations.
- String Type performs string concatenation.
Note: Be cautious, as calculations cannot be performed between different types. Ensure that the types match to avoid errors.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article