c# how to change the data type of a variable and assign it a new value code example
Example 1: c# change variable types
// Ask user for fave number
Console.Write("Enter your favorite number!: ");
int faveNumber = Convert.ToInt32(Console.ReadLine());
// Turn that answer into an int
Example 2: how to declare variables in c#
public int yourNumber = 5;