Soenneker.Utils.Method
4.0.461
Prefix Reserved
dotnet add package Soenneker.Utils.Method --version 4.0.461
NuGet\Install-Package Soenneker.Utils.Method -Version 4.0.461
<PackageReference Include="Soenneker.Utils.Method" Version="4.0.461" />
<PackageVersion Include="Soenneker.Utils.Method" Version="4.0.461" />
<PackageReference Include="Soenneker.Utils.Method" />
paket add Soenneker.Utils.Method --version 4.0.461
#r "nuget: Soenneker.Utils.Method, 4.0.461"
#:package Soenneker.Utils.Method@4.0.461
#addin nuget:?package=Soenneker.Utils.Method&version=4.0.461
#tool nuget:?package=Soenneker.Utils.Method&version=4.0.461
Soenneker.Utils.Method
Returns the calling member's name through C#'s CallerMemberName compiler feature.
Installation
dotnet add package Soenneker.Utils.Method
Quick start
using Soenneker.Utils.Method;
Call the static MethodUtil methods directly; no dependency-injection registration is required.
Usage
public void ProcessOrder()
{
string memberName = MethodUtil.Get();
// "ProcessOrder"
}
public string DiagnosticName => MethodUtil.Get();
// "DiagnosticName"
Get uses C#'s CallerMemberName attribute. The compiler supplies the containing member's name at
the call site, so the utility does not inspect a stack trace and the result follows ordinary
symbol renames. It can report methods, properties, and other supported member contexts.
The optional parameter is public because CallerMemberName requires it, but normal calls should
omit it. Passing a value explicitly returns that value instead of the caller's name:
string name = MethodUtil.Get("custom"); // "custom"
This helper returns only the member name. It does not include the declaring type, namespace, signature, source path, or line number.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Soenneker.Utils.Method:
| Package | Downloads |
|---|---|
|
Soenneker.Redis.Util
The general purpose utility library leveraging Redis for all of your caching needs |
|
|
Soenneker.Cosmos.Repository
A data persistence abstraction layer for Cosmos DB |
|
|
Soenneker.Google.SearchIndex
Publishes Google Indexing API URL notifications and retrieves their notification metadata. |
|
|
Soenneker.Zelos.Repository
A data persistence abstraction layer for Zelos DB |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.461 | 599 | 8/31/2026 |
| 4.0.460 | 108 | 8/30/2026 |
| 4.0.459 | 1,235 | 8/29/2026 |
| 4.0.458 | 54 | 8/29/2026 |
| 4.0.457 | 11,820 | 7/27/2026 |
| 4.0.456 | 4,427 | 7/16/2026 |
| 4.0.455 | 7,934 | 6/18/2026 |
| 4.0.453 | 12,819 | 4/23/2026 |
| 4.0.452 | 4,562 | 3/20/2026 |
| 4.0.447 | 5,867 | 3/10/2026 |
| 4.0.446 | 1,685 | 3/9/2026 |
| 4.0.445 | 315 | 3/9/2026 |
| 4.0.444 | 4,061 | 3/4/2026 |
| 4.0.443 | 20,311 | 1/2/2026 |
| 4.0.442 | 7,577 | 11/20/2025 |
| 4.0.441 | 5,326 | 10/29/2025 |
| 3.0.440 | 9,876 | 9/3/2025 |
| 3.0.439 | 4,477 | 8/11/2025 |
| 3.0.438 | 8,288 | 6/27/2025 |
| 3.0.437 | 6,659 | 5/27/2025 |
Clarify caller member helper