implicit
explicit
float f=12123456.213F
int a = Convert.ToInt32(f); //throw exception or
int a = (int)f; // not throw exception nut got an overflow value
parse and tryparse
string to other datatype
string a="100fh";
int num=int.Parse(a); //throw exception
int result=0;
bool isNum=int.TryParse(num,out result);
if(isNum){ Console.WriteLine(result);
}else{
Console.WriteLine("Invalid")}