---
title: "What are Func, Action, and Predicate delegates? When do you use them?"  
description: "What are Func, Action, and Predicate delegates? When do you use them?"  
author: "ICSM Computer"  
published: 2025-06-22  
updated: 2025-06-22  
canonical: https://www.mindstick.com/interview/34269/what-are-func-action-and-predicate-delegates-when-do-you-use-them  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# What are Func, Action, and Predicate delegates? When do you use them?

## What are `Func<>`, `Action<>`, and `Predicate<>` delegates? When do you use them?

\
These are **built-in generic delegates**:

- `Func<T, TResult>`: Takes parameters, returns a value.
- `Action<T>`: Takes parameters, returns void.
- `Predicate<T>`: Takes one input, returns `bool`.

```cs
Func<int, int, int> add = (a, b) => a + b;
Action<string> print = msg => Console.WriteLine(msg);
Predicate<int> isEven = x => x % 2 == 0;
```

Use them with LINQ, events, callbacks, or to make APIs more flexible.

## Answers

### Answer by ICSM Computer

## What are `Func<>`, `Action<>`, and `Predicate<>` delegates? When do you use them?

\
These are **built-in generic delegates**:

- `Func<T, TResult>`: Takes parameters, returns a value.
- `Action<T>`: Takes parameters, returns void.
- `Predicate<T>`: Takes one input, returns `bool`.

```cs
Func<int, int, int> add = (a, b) => a + b;
Action<string> print = msg => Console.WriteLine(msg);
Predicate<int> isEven = x => x % 2 == 0;
```

Use them with LINQ, events, callbacks, or to make APIs more flexible.


---

Original Source: https://www.mindstick.com/interview/34269/what-are-func-action-and-predicate-delegates-when-do-you-use-them

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
