
static void Main(string[] args)
{
int total = int.Parse("356");
string message = 7.ToString();
double preciseLength = 5.61;
int roundedLength = (int)preciseLength;
decimal price = 9.95m;
Console.WriteLine("total: {0} message: {1}",total,message);
Console.WriteLine($"double oreciseLength = {preciseLength}, int roundedLength = {roundedLength}");
Console.WriteLine($"price= {price}");
Console.ReadLine();
}
Results:
total: 356 message: 7
double oreciseLength = 5.61, int roundedLength = 5
price= 9.95
Operators
