Check out example codes for "c# csting". It will help you in understanding the concepts better.
Code Example 1
double myDouble = 9.78;
int myInt = (int) myDouble; // Manual casting: double to int
Console.WriteLine(myDouble); // Outputs 9.78
Console.WriteLine(myInt); // Outputs 9
Learn ReactJs, React Native from akashmittal.com