Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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, 02:16 AM
Registered User
 
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to nevincm
Default Label Array With Dynamic Size



hi friends
   i would be very greatful to you if you give an answer for this

How Can i decalre a label array with out a fixed size.
just like we are declaring in VB.NET Dim myarray() as string

i declared just like this string [] my array ; But runtime its showing error that it should be initialized


thanks & regards




 
Old April 13th, 2007, 11:24 AM
Registered User
 
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Look up how to use a Generic List and see if that suites what you need to accomplish (System.Collections.Generics).

A generic list is basically a strongly-typed ArrayList, so you can instantiate it with List<Label> myList = new List<Label>() to ensure only Label objects can be added.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with Dynamic Link Label Click Events chobo2 C# 4 November 8th, 2007 03:47 AM
Dynamic Text in Label funnylearning .NET Framework 2.0 2 September 18th, 2006 12:59 PM
RadioButtonList as array with label mlf ASP.NET 1.x and 2.0 Application Design 2 February 4th, 2005 01:18 PM
Create dynamic label in vb.net snowydust VB How-To 1 July 24th, 2004 05:32 AM
Label array dunnie Pro VB 6 7 August 29th, 2003 06:36 PM





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