CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: WPF Iteration

Threaded View

  1. #4
    Join Date
    Jun 2008
    Posts
    2,477

    Re: WPF Iteration

    Yep, that works. However, if it were me I would do this:

    Code:
    int i = 1;
    List<string> lines = new List<string>();
    while( i < 6 )
    {
        lines.Add( String.Format( "current value of n is {0}", n++ ) );
    }
    
    textbox1.Lines = lines.ToArray();
    Last edited by BigEd781; January 2nd, 2011 at 11:50 PM.

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

Featured