[C#][MaxScript] passign enums values to a C# fn

I’m new to Enums and I’m trying to figure out how I can pass enum values form Max script to a C# fucntion.
For some reason the argument is not being recognized…

here’s my C#


namespace myTools
{
    public class Files
    {
        
        public enum AssetType {heroes,grunts,weapons,items}

        public string newAsset(AssetType type, string assetName)
        {
            string message = string.Format("NewAsset:{0} {1}", type.ToString(), assetName);
            return message;
        }

    }
}

and the mxs with --listener output


Files =dotNetObject "myTools.Files"
--dotNetObject:myTools.Files

type=dotnetClass "myTools.Files+AssetType"
--dotNetClass:myTools.Files+AssetType

Files.NewAsset (type.heroes) "newHero"
-- Runtime error: No method found which matched argument list

Why the brackets in type.heroes? Try deleting them?

same result without brackets.
The listener indicates that mxs understands that (type.heroes) is a .NET Enum.
Even casting it as an enum using dotnet.ValueToDotNetObject doesn’t help
No problems on the C# compile side, so not sure what is breaking.

How about this:

Files = dotNetObject “myTools.Files”
–dotNetObject:myTools.Files

hero=(dotnetClass “myTools.Files+AssetType”).hero
–dotNetClass:myTools.Files+AssetType

Files.NewAsset hero “newHero”
– Runtime error: No method found which matched argument list