-
Nov 23rd, 2009, 02:21 AM
#1
Thread Starter
Fanatic Member
Console application.
How to explain "Sum {0}"?
{0} whether its indicating any position or index where output to be print?
Visual Studio.net 2010
If this post is useful, rate it
-
Nov 23rd, 2009, 08:55 AM
#2
Re: Console application.
Usually that format is used with some kind of output or the String.Format command. The {0} is indicating that the first variable passed will be ouput in that position. So:
Code:
String.Format("Sum {0}", 125);
would yield
-
Nov 23rd, 2009, 09:01 AM
#3
Re: Console application.
Originally Posted by Negative0
Usually that format is used with some kind of output or the String.Format command. The {0} is indicating that the first variable passed will be ouput in that position. So:
Code:
String.Format("Sum {0}", 125);
would yield
This can be expanded as much as you can
Code:
String.Format("Sum {0} in {1} Hands {2}", 125,"My","Now");
would yield
Code:
Sum 125 in My Hands Now
Where {0} - refers to the index
Please mark you thread resolved using the Thread Tools as shown
-
Nov 26th, 2009, 08:00 AM
#4
Re: Console application.
I am not sure for that question you are giving this answer ?
Please mark you thread resolved using the Thread Tools as shown
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|