---
uid: BenchmarkDotNet.Samples.IntroCategories
---

## Sample: IntroCategories

Combined together with `[BenchmarkCategory]` attribute, you can group the benchmarks into categories and filter them by categories.

### Source code

[!code-csharp[IntroCategories.cs](../../../samples/BenchmarkDotNet.Samples/IntroCategories.cs)]

### Command line examples:
    
```
--allCategories=A,B
--anyCategories=A,B
```

### Links

* @docs.filters
* The permanent link to this sample: @BenchmarkDotNet.Samples.IntroCategories

---