C# Type Casting
We need to convert a data of one type to another type before it is used in arithmetic operations that are called Type Conversion or Type Casting.
In C#, type casting is two types:
Implicit Conversions:
Implicit Conversions can always be performed without any loss of data.
Example:
short y=50; int x=y; // Implicit Conversions
Recommended Posts:
C#
1. C# Features
2. Difference Between C++ and C#
3. Difference Between C# and Java
4. .NET Framework
5. Benefits of .NET
6. C# Program Structure
7. C# Command Line Arguments
8. Console.ReadLine() and Console.WriteLine()
9. C# Literals
10. C# Data Types
11. Scope of Variables in C#
12. Boxing and Unboxing in C#
13. C# Operators
14. C# Type Casting