Welcome Guest ( Log In | Register )

Bump TopicReply to this topicRSS feed Start new topic Start Poll

Outline · [ Standard ] · Linear+

> #{0}

mike9407
post Apr 21 2017, 07:39 PM, updated 3 months ago


Getting Started
**
Group: Junior Member
Posts: 230

Joined: May 2015
I don't understand what is this in console program,can someone explain?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
PlayPlayHa
post Apr 26 2017, 04:44 PM


New Member
*
Group: Junior Member
Posts: 39

Joined: Nov 2008
sample:

System.Console.WriteLine("The Factorial of {0} is {1}.", num, result);

in this case:
{0} is first parameter -> num
{1} is 2nd parameter -> result

programming indexing is start from 0.. so 0 means 1st, 1 means 2nd, onwards blabla

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Lord Tiki Mick
post May 13 2017, 06:36 PM


Enthusiast
*****
Group: Senior Member
Posts: 890

Joined: Jul 2012
Most likely a placeholder.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
island
post May 14 2017, 06:47 AM


Regular
******
Group: Senior Member
Posts: 1,496

Joined: Jan 2007


get a look on string.format, it explained in details.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
mike9407
post May 19 2017, 07:44 AM


Getting Started
**
Group: Junior Member
Posts: 230

Joined: May 2015
QUOTE(PlayPlayHa @ Apr 26 2017, 04:44 PM)
sample:

System.Console.WriteLine("The Factorial of {0} is {1}.", num, result);

in this case:
{0} is first parameter -> num
{1} is 2nd parameter -> result

programming indexing is start from 0.. so 0 means 1st, 1 means 2nd, onwards blabla
*
Sorry I still blur,can u explain it more specifically for the parameters?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 

Switch to:
| Lo-Fi Version
0.0459sec    7.09    5 queries    GZIP Disabled
Time is now: 17th August 2017 - 09:48 AM