Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

How do i get this

Console.WriteLine("Koordinaattipiste " + (4,2) + " on kvandrantissa 1.");

to print

(4,2) 

instead of

(4, 2) 

with the space in between?

question from:https://stackoverflow.com/questions/65944327/how-to-get-this-string-concatenation-correctly-outputed

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
136 views
Welcome To Ask or Share your Answers For Others

1 Answer

Assuming that you unintentionally used a Tuple by enclosing the two values in brackets:

Console.WriteLine($"Koordinaattipiste ({x},{y}) on kvandrantissa 1.");

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...