Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
QuestionValue for the DateTime field Displayed in DataGridView is getting Edited. Pin
vinutha kempanna8-Nov-06 17:42
vinutha kempanna8-Nov-06 17:42 
QuestionWS-Security Pin
jpusany8-Nov-06 16:36
jpusany8-Nov-06 16:36 
QuestionCalling an unmanaged C++ dll from a C# application Pin
hybrid798-Nov-06 16:18
hybrid798-Nov-06 16:18 
AnswerRe: Calling an unmanaged C++ dll from a C# application [modified] Pin
George L. Jackson8-Nov-06 16:45
George L. Jackson8-Nov-06 16:45 
QuestionHow to allow a user to type only two digits after a decimal point in typed Pin
garrymullins8-Nov-06 14:10
garrymullins8-Nov-06 14:10 
AnswerRe: How to allow a user to type only two digits after a decimal point in typed Pin
Christian Graus8-Nov-06 15:06
protectorChristian Graus8-Nov-06 15:06 
QuestionNeed help capturing the context menu Pin
erikkl20008-Nov-06 14:10
erikkl20008-Nov-06 14:10 
QuestionStrange behavior with ArrayList remove [modified] Pin
malharone8-Nov-06 13:50
malharone8-Nov-06 13:50 
I'm working with the following Remove code. My code is failing at line # 6 and throwing an exception. I don't understand why "index == -1" (see immidiate-window output) is evaluating to true, eventhough my immidiate window is returning true for existance of 'column' object in the ArrayList. Furthermore, if I comment out lines #4-7 then the all is golden.

Any help would be appreciated.

Thanks,

- Malhar

public class ColumnCollection
{
	ArrayList _columnList;	//Assume this is initialized and properly populated

	...

1:	public void Remove (TreeListColumn column)
2:	{
3:		int index = _columnList.IndexOf (column)
4:		if (index == -1)
5:		{
6:			throw new ArgOutOfRangeException (...);
7:		}
8:		_columnList.RemoveAt (index);
9:	}

	...
}


Immidiate/Command Window (Break point at line # 3):
column == _columnList[4] ==> true
Object.ReferenceEquals (column, _columnList[4] ==> true
_columnList.IndexOf(column)				==>	-1 :wtf:

AnswerRe: Strange behavior with ArrayList remove Pin
Guffa8-Nov-06 19:26
Guffa8-Nov-06 19:26 
GeneralRe: Strange behavior with ArrayList remove Pin
malharone9-Nov-06 7:21
malharone9-Nov-06 7:21 
Questionenumerate the list of services in C# Pin
ke3p_up8-Nov-06 13:45
ke3p_up8-Nov-06 13:45 
QuestionHow to clear the check mark on checklistbox Pin
VN9808-Nov-06 13:37
VN9808-Nov-06 13:37 
Questionplease help me in this error Pin
arjunsasikumar8-Nov-06 11:06
arjunsasikumar8-Nov-06 11:06 
AnswerRe: please help me in this error Pin
Nougat H.8-Nov-06 11:39
Nougat H.8-Nov-06 11:39 
GeneralRe: please help me in this error Pin
arjunsasikumar8-Nov-06 19:04
arjunsasikumar8-Nov-06 19:04 
GeneralRe: please help me in this error Pin
arjunsasikumar8-Nov-06 19:06
arjunsasikumar8-Nov-06 19:06 
QuestionList views Pin
numbers1thru98-Nov-06 10:49
numbers1thru98-Nov-06 10:49 
AnswerRe: List views Pin
numbers1thru98-Nov-06 11:29
numbers1thru98-Nov-06 11:29 
QuestionTreeView Pin
numbers1thru98-Nov-06 10:31
numbers1thru98-Nov-06 10:31 
AnswerRe: TreeView Pin
Nougat H.8-Nov-06 11:44
Nougat H.8-Nov-06 11:44 
QuestionHow to detect laptop lid closed? Pin
vortex-58-Nov-06 8:40
vortex-58-Nov-06 8:40 
AnswerRe: How to detect laptop lid closed? Pin
Christian Graus8-Nov-06 8:53
protectorChristian Graus8-Nov-06 8:53 
AnswerRe: How to detect laptop lid closed? Pin
Drew Stainton9-Nov-06 13:55
Drew Stainton9-Nov-06 13:55 
GeneralRe: How to detect laptop lid closed? Pin
vortex-525-Nov-06 13:12
vortex-525-Nov-06 13:12 
Questionadding a dll Pin
barak1604878-Nov-06 8:18
barak1604878-Nov-06 8:18 

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.