Skip to content

Empty ...

Pawel Gerr edited this page Feb 8, 2021 · 6 revisions

Empty Actions

Convenience methods providing delegates of type Action<..> containing empty bodies (dummy methods).

Usage

public static void Main()
{
	MyMethod_1(Empty.Action); // provides MyMethod_1 with an empty "Action"
	MyMethod_2(Empty.Action); // provides MyMethod_2 with an empty "Action<string>"
}

private static void MyMethod_1(Action action)
{
	...
}

private static void MyMethod_2(Action<string> action)
{
	...
}

* [Empty Disposables](Empty-Disposables)
* [Empty read-only Collections](Empty-ReadOnly-Collections)
Clone this wiki locally