Click here to Skip to main content
15,884,986 members
Home / Discussions / C#
   

C#

 
GeneralRe: MQSeries from .NET Pin
Gaul17-Sep-02 4:53
Gaul17-Sep-02 4:53 
GeneralRe: MQSeries from .NET Pin
SimonS17-Sep-02 5:27
SimonS17-Sep-02 5:27 
GeneralRe: MQSeries from .NET Pin
leppie17-Sep-02 7:24
leppie17-Sep-02 7:24 
GeneralRe: MQSeries from .NET Pin
Gaul25-Sep-02 12:05
Gaul25-Sep-02 12:05 
QuestionHow to remove null from arraylist? Pin
leppie17-Sep-02 0:53
leppie17-Sep-02 0:53 
AnswerRe: How to remove null from arraylist? Pin
jan larsen17-Sep-02 1:18
jan larsen17-Sep-02 1:18 
GeneralRe: How to remove null from arraylist? Pin
leppie17-Sep-02 1:31
leppie17-Sep-02 1:31 
GeneralRe: How to remove null from arraylist? Pin
jan larsen17-Sep-02 3:45
jan larsen17-Sep-02 3:45 
You are making some kind of mistake when you are trying to remove the item, try this:
ArrayList list = new ArrayList();
list.Add("item0");
list.Add("item1");
list.Add(null);
list.Add("item3");
Console.WriteLine("With null value at index 2:");
foreach (string str in list)
{
	Console.WriteLine(str);
}
Console.WriteLine("");
list.RemoveAt(2);
Console.WriteLine("Without null value at index 2:");
foreach (string str in list)
{
	Console.WriteLine(str);
}


It shows that removeAt() DOES work...

"After all it's just text at the end of the day. - Colin Davies

"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
GeneralRe: How to remove null from arraylist? Pin
leppie17-Sep-02 4:26
leppie17-Sep-02 4:26 
GeneralRe: How to remove null from arraylist? Pin
leppie17-Sep-02 4:35
leppie17-Sep-02 4:35 
GeneralRe: How to remove null from arraylist? Pin
Ryan Cromwell17-Sep-02 3:12
Ryan Cromwell17-Sep-02 3:12 
GeneralGotDotNet workspaces :) Pin
leppie16-Sep-02 23:30
leppie16-Sep-02 23:30 
GeneralRe: GotDotNet workspaces :) Pin
Ray Cassick17-Sep-02 10:07
Ray Cassick17-Sep-02 10:07 
GeneralRe: GotDotNet workspaces :) Pin
leppie17-Sep-02 10:18
leppie17-Sep-02 10:18 
GeneralRe: GotDotNet workspaces :) Pin
Paul Watson17-Sep-02 22:00
sitebuilderPaul Watson17-Sep-02 22:00 
GeneralRe: GotDotNet workspaces :) Pin
leppie18-Sep-02 1:57
leppie18-Sep-02 1:57 
GeneralConsuming Web Services... Pin
Matt Philmon16-Sep-02 11:16
Matt Philmon16-Sep-02 11:16 
GeneralRe: Consuming Web Services... Pin
leppie16-Sep-02 11:26
leppie16-Sep-02 11:26 
GeneralRe: Consuming Web Services... Pin
Paul Watson17-Sep-02 0:05
sitebuilderPaul Watson17-Sep-02 0:05 
GeneralRe: Consuming Web Services... Pin
Matt Philmon17-Sep-02 5:35
Matt Philmon17-Sep-02 5:35 
GeneralPrivileges [again] Pin
Nnamdi Onyeyiri16-Sep-02 10:24
Nnamdi Onyeyiri16-Sep-02 10:24 
GeneralRe: Privileges [again] Pin
leppie16-Sep-02 10:51
leppie16-Sep-02 10:51 
GeneralRe: Privileges [again] Pin
Nnamdi Onyeyiri16-Sep-02 11:32
Nnamdi Onyeyiri16-Sep-02 11:32 
GeneralRe: Privileges [again] Pin
leppie16-Sep-02 11:54
leppie16-Sep-02 11:54 
GeneralRe: Privileges [again] Pin
leppie16-Sep-02 12:12
leppie16-Sep-02 12:12 

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.