Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 13th, 2007, 03:20 PM
Authorized User
 
Join Date: Apr 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default Place string values into ListBox

Hello. I would like to know to take, for example, an array of 10 strings and place each string of the array into a ListBox control. Thank-you for your help!

Computers will never surpass the human brain; no computer will ever be able to replicate human stupidity.
__________________
If only computers could write programs themselves...
 
Old April 13th, 2007, 03:44 PM
Friend of Wrox
 
Join Date: Dec 2006
Posts: 176
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there are many way
use this code

foreach(String <variableName> in <StringArrayName>)
<listBoxName>.Items.ADD(<variable>);


kiani,mahdi
 
Old April 13th, 2007, 06:36 PM
Authorized User
 
Join Date: Apr 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank-you, that was perfect. I guess for some reason I was expecting it to be harder lol!

If only computers could write programs themselves...





Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple Listbox values in another listbox terryv Excel VBA 0 June 27th, 2007 07:01 AM
Using Values from a ListBox timmaher Classic ASP Databases 2 September 14th, 2005 10:01 AM
Values from a ListBox mrideout BOOK: Beginning ASP.NET 1.0 0 December 1st, 2004 09:53 AM
Getting Values From ListBox DARSIN General .NET 2 October 1st, 2004 02:32 AM
Listbox Values Louisa VB.NET 2002/2003 Basics 1 February 13th, 2004 01:28 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.