How do I turn an enum into a list?

The idea is to use the Enum. GetValues() method to get an array of the enum constants’ values. To get an IEnumerable<T> of all the values in the enum, call Cast<T>() on the array. To get a list, call ToList() after casting .

Sizin İçin Seçtik  What software is used to make video tutorials?

Leave a Reply

Your email address will not be published. Required fields are marked *