Share via


TraceModule.GetSourceLocation Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the location in source for the specified CLR method token and offset into the method.

Namespace:  Microsoft.VisualStudio.TraceLog
Assembly:  Microsoft.VisualStudio.TraceLog (in Microsoft.VisualStudio.TraceLog.dll)

Syntax

'Declaration
Public Function GetSourceLocation ( _
    metadataToken As Integer, _
    offset As Integer _
) As SourceLocation
'Usage
Dim instance As TraceModule
Dim metadataToken As Integer
Dim offset As Integer
Dim returnValue As SourceLocation

returnValue = instance.GetSourceLocation(metadataToken, _
    offset)
public SourceLocation GetSourceLocation(
    int metadataToken,
    int offset
)
public:
SourceLocation^ GetSourceLocation(
    int metadataToken, 
    int offset
)
member GetSourceLocation : 
        metadataToken:int * 
        offset:int -> SourceLocation 
public function GetSourceLocation(
    metadataToken : int, 
    offset : int
) : SourceLocation

Parameters

  • offset
    Type: System.Int32
    The intermediate-language offset into the method.

Return Value

Type: Microsoft.VisualStudio.TraceLog.SourceLocation
A SourceLocation that contains the file name and source code range for the statement at the specified offset. If there is no source location or the source location cannot be determined, null is returned.

.NET Framework Security

See Also

Reference

TraceModule Class

TraceModule Members

Microsoft.VisualStudio.TraceLog Namespace