Skip to content
#

guard

Here are 218 public repositories matching this topic...

mantinband
mantinband commented Mar 16, 2022

Add the following extensions methods for dictionaries:

var dictionary = new Dictionary<string, string>
{
    ["key1"] = "value1",
    ["key2"] = "value2",
};

dictionary.Throw().IfContainsKey("key1");
dictionary.Throw().IfNotContainsKey("key3");

And the corresponding dictionary properties extension methods:

var dictionary = new Dictionary<string, string
enhancement good first issue

Improve this page

Add a description, image, and links to the guard topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the guard topic, visit your repo's landing page and select "manage topics."

Learn more