In Console.WriteLine, {0} acts as a placholder for a value to be put in a string.
So Console.WriteLine("Enter Value p[{0}]:", i); (Let i in the for loop be 3) would print out: Enter Value p[ 3 ]:
I would prefer to change this to
Console.WriteLine("Enter Value Number {0} :", i);
which in the same case( i = 3 ) would print out: Enter Value Number 3 :
ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661