Soenneker.Utils.Method 4.0.460

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.Method --version 4.0.460
                    
NuGet\Install-Package Soenneker.Utils.Method -Version 4.0.460
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Utils.Method" Version="4.0.460" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.Method" Version="4.0.460" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.Method" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Utils.Method --version 4.0.460
                    
#r "nuget: Soenneker.Utils.Method, 4.0.460"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Utils.Method@4.0.460
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Utils.Method&version=4.0.460
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.Method&version=4.0.460
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.Method

A utility library providing various method() related operations.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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 1,233 8/31/2026
4.0.460 157 8/30/2026
4.0.459 1,692 8/29/2026
4.0.458 86 8/29/2026
4.0.457 12,015 7/27/2026
4.0.456 4,428 7/16/2026
4.0.455 7,955 6/18/2026
4.0.453 12,820 4/23/2026
4.0.452 4,563 3/20/2026
4.0.447 5,868 3/10/2026
4.0.446 1,687 3/9/2026
4.0.445 316 3/9/2026
4.0.444 4,063 3/4/2026
4.0.443 20,312 1/2/2026
4.0.442 7,579 11/20/2025
4.0.441 5,327 10/29/2025
3.0.440 9,879 9/3/2025
3.0.439 4,478 8/11/2025
3.0.438 8,289 6/27/2025
3.0.437 6,660 5/27/2025
Loading failed

Clarify caller member name usage