GetDynamic(int)
Gets a CallerInfo of the caller by performing a stack walk with StackFrame.
Declaration
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "The caller information is diagnostic. When trimming removes the metadata of a frame, StackFrame.GetMethod returns null, and the method returns an empty CallerInfo.")]
public static CallerInfo GetDynamic(int skipFrames)Parameters
| Type | Name | Description |
|---|---|---|
| int | skipFrames | The number of stack frames to skip. |
Returns
| Type | Description |
|---|---|
| CallerInfo | A CallerInfo for the caller, after skipping the specified number of stack frames, or |