Click here to Skip to main content
15,909,030 members
Home / Discussions / C#
   

C#

 
Questioncomponent Pin
nasis14-Dec-10 2:10
nasis14-Dec-10 2:10 
AnswerRe: component Pin
PIEBALDconsult4-Dec-10 6:44
mvePIEBALDconsult4-Dec-10 6:44 
AnswerRe: component Pin
Luc Pattyn4-Dec-10 7:39
sitebuilderLuc Pattyn4-Dec-10 7:39 
GeneralRe: component Pin
PIEBALDconsult4-Dec-10 8:31
mvePIEBALDconsult4-Dec-10 8:31 
AnswerRe: component Pin
RaviRanjanKr15-Dec-10 17:48
professionalRaviRanjanKr15-Dec-10 17:48 
Questionindex of items in CheckedListBox Pin
navidsoft4-Dec-10 1:50
professionalnavidsoft4-Dec-10 1:50 
AnswerRe: index of items in CheckedListBox Pin
Abhinav S4-Dec-10 2:05
Abhinav S4-Dec-10 2:05 
AnswerRe: index of items in CheckedListBox Pin
Luc Pattyn4-Dec-10 2:07
sitebuilderLuc Pattyn4-Dec-10 2:07 
Hi,

not sure what it is you are trying, however here are some ideas:

1.
you can't insert elements in an array when the array hasn't been created yet. Maybe you are missing a statement along the lines of: arr=new string[CheckedListbox1.Items.Count];

2.
I wonder why you would store a range of numbers in a string array in the first place. Strings are often abused; the general recommendation is to use actual types, not strings, where ever possible.

3.
A CheckedListbox has some properties that directly identify the checked items; see CheckedItems and CheckedIndices.

4.
Most often a generic list is a handy substitute for an array, as you don't need to set a size at the start, you can just add to it at will.

5.
If you aren't familiar with it yet, make sure you read up on the foreach statement. It works well with arrays and lists alike.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.


QuestionDatagrid view's Event Control Pin
toetoeag3-Dec-10 21:04
toetoeag3-Dec-10 21:04 
AnswerRe: Datagrid view's Event Control Pin
Eddy Vluggen4-Dec-10 2:25
professionalEddy Vluggen4-Dec-10 2:25 
QuestionHow to return an environment variable? [modified] Pin
turbosupramk33-Dec-10 7:16
turbosupramk33-Dec-10 7:16 
AnswerRe: How to return an environment variable? Pin
turbosupramk33-Dec-10 9:48
turbosupramk33-Dec-10 9:48 
AnswerRe: How to return an environment variable? Pin
T M Gray3-Dec-10 10:40
T M Gray3-Dec-10 10:40 
GeneralRe: How to return an environment variable? Pin
turbosupramk33-Dec-10 11:27
turbosupramk33-Dec-10 11:27 
AnswerRe: How to return an environment variable? Pin
Ian Shlasko3-Dec-10 10:52
Ian Shlasko3-Dec-10 10:52 
GeneralRe: How to return an environment variable? Pin
turbosupramk33-Dec-10 11:28
turbosupramk33-Dec-10 11:28 
AnswerRe: How to return an environment variable? Pin
PIEBALDconsult3-Dec-10 11:13
mvePIEBALDconsult3-Dec-10 11:13 
GeneralRe: How to return an environment variable? Pin
turbosupramk33-Dec-10 11:29
turbosupramk33-Dec-10 11:29 
AnswerRe: How to return an environment variable? Pin
Dr.Walt Fair, PE3-Dec-10 13:25
professionalDr.Walt Fair, PE3-Dec-10 13:25 
GeneralRe: How to return an environment variable? Pin
turbosupramk33-Dec-10 14:03
turbosupramk33-Dec-10 14:03 
GeneralRe: How to return an environment variable? Pin
Dr.Walt Fair, PE3-Dec-10 14:24
professionalDr.Walt Fair, PE3-Dec-10 14:24 
GeneralRe: How to return an environment variable? Pin
turbosupramk33-Dec-10 18:33
turbosupramk33-Dec-10 18:33 
GeneralRe: How to return an environment variable? Pin
Dr.Walt Fair, PE3-Dec-10 19:52
professionalDr.Walt Fair, PE3-Dec-10 19:52 
QuestionPrevent class member circular initialization? Pin
frattaro3-Dec-10 5:01
frattaro3-Dec-10 5:01 
AnswerRe: Prevent class member circular initialization? Pin
_Erik_3-Dec-10 5:22
_Erik_3-Dec-10 5:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.