Click here to Skip to main content
15,896,359 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do I access a node in an ArrayList? Pin
Guillermo Rivero13-Oct-03 9:07
Guillermo Rivero13-Oct-03 9:07 
AnswerRe: How do I access a node in an ArrayList? Pin
leppie13-Oct-03 9:45
leppie13-Oct-03 9:45 
GeneralaxWebBrowser, Tab Control and Memory Pin
JJF00713-Oct-03 8:15
JJF00713-Oct-03 8:15 
GeneralAssert that halt execution Pin
Colin Angus Mackay13-Oct-03 5:10
Colin Angus Mackay13-Oct-03 5:10 
GeneralRe: Assert that halt execution Pin
leppie13-Oct-03 7:02
leppie13-Oct-03 7:02 
GeneralRe: Assert that halt execution Pin
Colin Angus Mackay13-Oct-03 11:09
Colin Angus Mackay13-Oct-03 11:09 
GeneralDebugging and excution Pin
totig13-Oct-03 4:38
totig13-Oct-03 4:38 
GeneralRe: Debugging and excution Pin
Colin Angus Mackay13-Oct-03 5:01
Colin Angus Mackay13-Oct-03 5:01 
Could you be doing something in code that is conditionaly on the configuration. (i.e. Debug Vs. Release)

Check your code for #if DEBUG blocks that may be doing extra work in debug mode that isn't being done in release. Or Debug.Assert calls because they only get evaluated in Debug builds.

As an example of what I mean. Run the following program in Debug and release mode and note the difference.

using System;
using System.Diagnostics;

namespace WeeTester
{

	class Class1
	{
		private static int _i = 0;

		[STAThread]
		static void Main(string[] args)
		{
			Console.WriteLine("_i={0}", Add());
			Debug.Assert(Add()==1, "_i != 1");
			Console.WriteLine("_i={0}", Add());

			Console.ReadLine();
		}
		
		private static int Add()
		{
			return _i++;
		}
	}
}



You will see that in Debug mode the output is:
_i=0
_i=2


and in Release the result is:
_i=0
_i=1


because the call to Add() in the Debug.Assert is not made anymore.


--Colin Mackay--

"In the confrontation between the stream and the rock, the stream always wins - not through strength but perseverance." (H. Jackson Brown)


GeneralVertexshader Pin
WillemM12-Oct-03 23:14
WillemM12-Oct-03 23:14 
GeneralRe: Vertexshader Pin
leppie13-Oct-03 7:49
leppie13-Oct-03 7:49 
QuestionHow do I retrieve user name? Pin
EnkelIk12-Oct-03 23:04
EnkelIk12-Oct-03 23:04 
AnswerRe: How do I retrieve user name? Pin
Kannan Kalyanaraman13-Oct-03 2:03
Kannan Kalyanaraman13-Oct-03 2:03 
GeneralRe: How do I retrieve user name? Pin
EnkelIk13-Oct-03 2:57
EnkelIk13-Oct-03 2:57 
GeneralRe: How do I retrieve user name? Pin
Kannan Kalyanaraman13-Oct-03 3:25
Kannan Kalyanaraman13-Oct-03 3:25 
GeneralRe: How do I retrieve user name? Pin
EnkelIk13-Oct-03 4:42
EnkelIk13-Oct-03 4:42 
AnswerRe: How do I retrieve user name? Pin
Mike Dimmick13-Oct-03 4:24
Mike Dimmick13-Oct-03 4:24 
GeneralRe: How do I retrieve user name? Pin
EnkelIk15-Oct-03 22:25
EnkelIk15-Oct-03 22:25 
AnswerRe: How do I retrieve user name? Pin
Bo Hunter13-Oct-03 18:17
Bo Hunter13-Oct-03 18:17 
GeneralRe: How do I retrieve user name? Pin
EnkelIk14-Oct-03 3:51
EnkelIk14-Oct-03 3:51 
GeneralListBox Help Pin
geekything12-Oct-03 23:00
geekything12-Oct-03 23:00 
GeneralInterfaces Pin
deanoA12-Oct-03 22:40
deanoA12-Oct-03 22:40 
GeneralRe: Interfaces Pin
gonenb12-Oct-03 22:47
gonenb12-Oct-03 22:47 
GeneralRe: Interfaces Pin
deanoA12-Oct-03 22:55
deanoA12-Oct-03 22:55 
GeneralRe: Interfaces Pin
Randhir Sinha13-Oct-03 0:42
Randhir Sinha13-Oct-03 0:42 
GeneralRe: Interfaces Pin
Alvaro Mendez14-Oct-03 7:24
Alvaro Mendez14-Oct-03 7:24 

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.