Click here to Skip to main content
15,906,708 members
Home / Discussions / C#
   

C#

 
GeneralRe: Working with Multiple Forms Pin
hammerstein0511-Dec-08 6:52
hammerstein0511-Dec-08 6:52 
GeneralRe: Working with Multiple Forms Pin
EliottA11-Dec-08 6:54
EliottA11-Dec-08 6:54 
GeneralRe: Working with Multiple Forms Pin
Jim Crafton11-Dec-08 7:14
Jim Crafton11-Dec-08 7:14 
AnswerRe: Working with Multiple Forms Pin
#realJSOP11-Dec-08 4:54
professional#realJSOP11-Dec-08 4:54 
GeneralRe: Working with Multiple Forms Pin
led mike11-Dec-08 5:29
led mike11-Dec-08 5:29 
GeneralRe: Working with Multiple Forms Pin
Ed K11-Dec-08 6:54
Ed K11-Dec-08 6:54 
AnswerRe: Working with Multiple Forms [modified] Pin
Chazzysb11-Dec-08 5:14
Chazzysb11-Dec-08 5:14 
QuestionLeave Event Pin
nagendra.vk11-Dec-08 4:17
nagendra.vk11-Dec-08 4:17 
AnswerRe: Leave Event Pin
Ashfield11-Dec-08 4:46
Ashfield11-Dec-08 4:46 
Question[Message Deleted] Pin
Paul Unsworth11-Dec-08 4:16
Paul Unsworth11-Dec-08 4:16 
AnswerRe: Excel get_Range function in C# Pin
Ashfield11-Dec-08 4:51
Ashfield11-Dec-08 4:51 
GeneralRe: Excel get_Range function in C# Pin
Paul Unsworth11-Dec-08 5:13
Paul Unsworth11-Dec-08 5:13 
Questionwana help in programming(university transport system) Pin
asma zaheer11-Dec-08 3:58
asma zaheer11-Dec-08 3:58 
AnswerRe: wana help in programming(university transport system) Pin
#realJSOP11-Dec-08 4:07
professional#realJSOP11-Dec-08 4:07 
GeneralRe: wana help in programming(university transport system) Pin
Ashfield11-Dec-08 4:32
Ashfield11-Dec-08 4:32 
AnswerRe: wana help in programming(university transport system) PinPopular
carbon_golem11-Dec-08 4:10
carbon_golem11-Dec-08 4:10 
GeneralRe: wana help in programming(university transport system) Pin
EliottA11-Dec-08 4:32
EliottA11-Dec-08 4:32 
GeneralRe: wana help in programming(university transport system) Pin
carbon_golem11-Dec-08 4:35
carbon_golem11-Dec-08 4:35 
GeneralRe: wana help in programming(university transport system) Pin
Ashfield11-Dec-08 4:55
Ashfield11-Dec-08 4:55 
GeneralRe: wana help in programming(university transport system) Pin
carbon_golem11-Dec-08 5:15
carbon_golem11-Dec-08 5:15 
GeneralRe: wana help in programming(university transport system) Pin
Christian Graus11-Dec-08 8:07
protectorChristian Graus11-Dec-08 8:07 
AnswerRe: wana help in programming(university transport system) Pin
Nishant Singh11-Dec-08 4:59
Nishant Singh11-Dec-08 4:59 
QuestionRemove data from listbox, then overwrite (save) listbox data in a new create file. Pin
irsalina11-Dec-08 3:42
irsalina11-Dec-08 3:42 
AnswerRe: Remove data from listbox, then overwrite (save) listbox data in a new create file. Pin
Nishant Singh11-Dec-08 4:56
Nishant Singh11-Dec-08 4:56 
QuestionRe: Remove data from listbox, then overwrite (save) listbox data in a new create file. Pin
irsalina11-Dec-08 15:55
irsalina11-Dec-08 15:55 
Well, I've tried and I guess you meant it this way.
public void WriteToFile()
        {
            using (StreamWriter swb = new StreamWriter(Filename))
            {
                for (int i = 1; i <= (listBoxBlockedNumberDD.Items.Count+1); i++ )
                {
                    <big>swb.WriteLine(listBoxBlockedNumberDD.Items[i].ToString());</big>                }
                swb.Close();
            }
        }

But now, the Big line threw error :
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Additional information: ArgumentOutOfRangeException
Parameter name: index

How could this happen?

irsalina [student]

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.