expressions are the empty valued expressions. They do not have any values.
The above code prints the stuff present in the double quotes but we didn't had any value in it.
We cannot generate complex
expressions by using void
expressions as operands. If we do, it will throw a compile time error.
Console.WriteLine("Hi") + 5; // Error (Compile time)
The above code will gives a compile time error as we are trying to generate a complex
expression with void
Asked In: Spotted While Learning |