StackFrame.ReturnType StackFrame.ReturnType StackFrame.ReturnType StackFrame.ReturnType StackFrame.ReturnType Property

Definition

Gets a string that contains the return type for the stack property.

public:
 property System::String ^ ReturnType { System::String ^ get(); };
public:
 property Platform::String ^ ReturnType { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(102)]
[get: System.Runtime.InteropServices.DispId(102)]
public string ReturnType { get; }
member this.ReturnType : string
Public ReadOnly Property ReturnType As String
Property Value

A string that containing the return type for the stack property.

Examples

The following example demonstrates how to use the ReturnType property.

public static void TestStackFrames(DTE dte)  
{  
    // Setup debug Output window.  
    Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);  
    w.Visible = true;  
    OutputWindow ow = (OutputWindow)w.Object;  
    OutputWindowPane owp = ow.OutputWindowPanes.Add("Stack Frames Test");  
    owp.Activate();  

    EnvDTE.StackFrames stackFrames = dte.Debugger.CurrentThread.StackFrames;  
    owp.OutputString("
Number of items in the Current Stack collection: " + stackFrames.Item(1).Collection.Count + "
"); foreach(EnvDTE.StackFrame sf in stackFrames) { owp.OutputString("
Stack Frame: " + sf.FunctionName); owp.OutputString("
Edition of the environment : " + sf.DTE.Edition); owp.OutputString("
Language : " + sf.Language); owp.OutputString("
Locals"); EnvDTE.Expressions expressions = sf.Locals; foreach(EnvDTE.Expression exp in expressions) owp.OutputString("
" + exp.Name + " = " + exp.Value); owp.OutputString("
Module : " + sf.Module); owp.OutputString("
Current Thread ID : " + sf.Parent.ID); owp.OutputString("
Return Type : " + sf.ReturnType); } }
Shared Sub TestStackFrames(ByRef dte As EnvDTE.DTE)  
    Dim str As String  
    Dim stackFrames As EnvDTE.StackFrames = dte.Debugger.CurrentThread.StackFrames  
    str = "Number of items in the Current Stack collection: " + _  
          stackFrames.Item(1).Collection.Count.ToString()  
    For Each sf As EnvDTE.StackFrame In stackFrames  
        str += vbCrLf + vbCrLf + "  Stack Frame: " + sf.FunctionName  
        str += vbCrLf + "  Edition of the environment: " + sf.DTE.Edition  
        str += vbCrLf + "  Language: " + sf.Language  
        str += vbCrLf + "  Locals"  
        Dim expressions As EnvDTE.Expressions = sf.Locals  
        For Each exp As EnvDTE.Expression In expressions  
            str += vbCrLf + "    " + exp.Name + " = " + exp.Value.ToString()  
        Next  
        str += vbCrLf + "  Module: " + sf.Module  
        str += vbCrLf + "  Current Thread ID: " + sf.Parent.ID.ToString()  
        str += vbCrLf + "  Return Type: " + sf.ReturnType  
    Next  
    MessageBox.Show(str, "Stack Frame Test - Properties")  
End Sub  

Applies to