Groups | Blog | Home
all groups > visual studio .net debugging > december 2004 >

visual studio .net debugging : Viewing function return value in C#


twahl
12/29/2004 7:50:32 AM
Assume that I am in the debugger and have broken on the return statement.
How can I view the value that this function will return if I press F10?

Thanks for your help in advance!!!

Public string GetStringVal(string str)
{
return ManipulateString(str);
}




dverma NO[at]SPAM online.microsoft.com
1/3/2005 9:07:12 PM
Hi!

In oder to see what ManipulateString(str) will return, you can do either of two things :

(a) type ManipulateString(str) in Watch window, the function will be executed, and the evaluated value show up in watch (this is called Function Evaluation, or funceval)
(b) type ManipulateString(str) in the Immediate window (this is under Debug->Windows), once again the function will be evaluated and its value shown.

Regards,
D.V.

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
[quoted text, click to view]


--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
AddThis Social Bookmark Button