-
-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Labels
Description
Please refer to the following code
# The value of the name variable comes from the return value of another function and may be null
# For simplicity in testing, it is fixed to null here
name = null
text = "my name is " + name
# Interpolated strings are the same.
# text = $"my name is {name}"
# Output the text variable, its value is: null
print text
The same code behaves like this in C#:
string name = null
var text = "my name is " + name
# Output the text variable, its value is: my name is
Console.WriteLine(text)Mertsch