As C# is a strongly typed language, working with the data types may seem difficult for newbies in programming. This is how to convert a double variable or value to string in order to avoid exception in your code.
double num = 50.4;
//Use ToString() to convert directly
string num1 = num.ToString();
//Output the string
//It shows 50.4 but as string value that cannot be used in calculation, unlike the double value declared earlier