13 Replies
returned array
You can use a
for
or foreach
loop, or string.Join
So "[" + string.Join(", ", myArray) + "]"
, or use string interpolation $"[{string.Join(", ", myArray)}]"
idk about string interpolation
is it like list comprehension in python
No, it's like string interpolation in python
f"My value: {myValue}"
hmm i got it
thx
but where is the index numn
{0}
and why there is a $ symbol
C# uses
$"..."
for string interpolation, just like python uses f"..."
There's no {0}
because string interpolation doesn't use {0}
so if i type print(myArray) python making this automatically
Indeed, and C# doesn't
cool
which one is the most common
No idea. Use whichever you think is more readable
allright
!close
Closed!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.