Enum fuction creation
Created at 25 Dec 2023, 10:00
AH
Enum fuction creation
25 Dec 2023, 10:00
public enum CustomType
{
Low,
Medium,
High
}
[Parameter("P1", Group = "new type", DefaultValue = Low)]
public CustomType P1 { get; set; }
switch (P1 )
{
case CustomType
.Low:
fpsvsmasS_val = FPvsMAsVarsB ;
break;
case CustomType
.Medium:
fpsvsmasS_val = FPvsMAsVarsS;
break;
case CustomType
.High
:
fpsvsmasS_val = FPvsMAsVarsS;
break;
}
Hello guys, I have a custom enum list which I will use several times on my code,
Is there a way to set that enum list on a function to reduce lines of my code?
Thanks in advanced
ctrader.guru
27 Dec 2023, 08:32
Try this approach
@ctrader.guru