Can I iterate through an enum?

See the below code:

if (pieceName == Piece.PieceType.ANTIDEPRESSANTS.ToString ()) {
    return Piece.PieceType.ANTIDEPRESSANTS;

There are 10 other types of Piece.PieceType’s. Is it possible to use some kind of for loop to flick through each one? Like this, but functional?

for (int i = 0; i<Piece.PieceType.count; ++i){
if (pieceName == Piece.PieceType*.ToString ()) {*

return Piece.PieceType*;*
I found [this][1] and [this][2] answer, but I don’t have an Enum class, or a GetValues() function. There’s got to be some way, right?
_[1]: C# Iterating through an enum? (Indexing a System.Array) - Stack Overflow
[2]: .net - How to loop through all enum values in C#? - Stack Overflow

Enum exists in System namespace

	string[] PieceTypeNames = System.Enum.GetNames (typeof(PieceType));

	for(int i = 0; i < PieceTypeNames.Length; i++){
		Debug.Log (PieceTypeNames*);*
  •   }*

If you want the enum as opposed to the string representation:

using System;
foreach(Piece.PieceType pieceType in Enum.GetValues(typeof(Piece.PieceType)))
   Debug.Log (pieceType);