Results 1 to 4 of 4

Thread: Console application.

  1. #1

    Thread Starter
    Fanatic Member vijy's Avatar
    Join Date
    May 2007
    Location
    India
    Posts
    548

    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


  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    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
    Code:
    Sum 125

  3. #3
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: Console application.

    Quote Originally Posted by Negative0 View Post
    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
    Code:
    Sum 125
    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

  4. #4
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    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
  •  



Click Here to Expand Forum to Full Width