My enum consists of the following values:
private enum PublishStatusses{
NotCompleted,
Completed,
Error
};
I want to be able to
According to this documentation: https://docs.microsoft.com/pt-br/dotnet/api/system.enum.tostring?view=netframework-4.8
It is possible to just convert a enumerator to string using a format like this:
public enum Example
{
Example1,
Example2
}
Console.WriteLine(Example.Example1.ToString("g"));
//Outputs: "Example1"
You can see all the possible formats in this link: https://docs.microsoft.com/pt-br/dotnet/api/system.string?view=netframework-4.8