Not able to work with console.writeline()

Hi

I have a simple windows application which contains a single form. For one of the button event of the form, I was using the below statement. I dont know why the required output is not showing up under the console. or console window itself is not showing up.

while (NodeIter.MoveNext())

{

Console.WriteLine("Output criteria matching the Xpath Expression: {0}", NodeIter.Current.Value);

};

Any help on this is highly appreciated.

[726 byte] By [edukulla] at [2008-1-6]
# 1
Have you considered perhaps that the line is not being executed. Placea breakpoint on the while statement and run the program. See if the program hits that line and then step through to the next line.
MarcD at 2007-10-2 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2

Hi

Thanks for extending help..

Yes,When I do debug the app placing a breakpoint, I could see that the control goes to that statement and statements following it, but the statement is not appearing under console UI. The output window also shows of the statement .Earlier I used to get the console window opened for the writeline method. May be Iam missing something. I dont know.

Thanks!

edukulla at 2007-10-2 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 3
The console window isn't showing up because you are not creating a console application. If you want to view, what I am guessing is debug output, then you might try Debug.Writeline.
ericrtodd at 2007-10-2 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified