How to beautifully save the player's type in C#

I am looking for a way for save the player’s type in a beautiful way

It is totally fine for me to save the type like this:

int attacker = 1;
int healer = 2;
int guard = 3;

then I can assign their type by calling a function like this:

public void AssignType(int type){
   if (type == 1){
      this. type = healer;   
   ... etc

But it is not perfect for me because there will be a lot more types of player i want to add in the future and I will be awful for there is too many if statement hard coded.
Any suggestion to more effective way of data structure guys?

You are probably looking for enums?

public enum PlayerType

public class Player
    public PlayerType Type; //you can directly assign this for example PlayerType.Guard;