? I dont understand ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

? I dont understand ?

why doesn't this work? int c = 11; string x = c.ToString; why do I have to use parse or Conver.To in this case and cant use .ToString?

9th Apr 2020, 5:22 AM
Michael
3 Answers
+ 1
I don't know much c# but maybe you need to complete with () parentheses. c.ToString();
9th Apr 2020, 5:44 AM
Jonathan Alvarado
Jonathan Alvarado - avatar
+ 1
Michael ToString is a method and method always end with (). So you should use ToString().
9th Apr 2020, 6:13 AM
A͢J
A͢J - avatar
0
YEAH thanks for the answers I kinda forgot the ()
9th Apr 2020, 4:53 PM
Michael