Use enum dropdown list in custom function
Use enum dropdown list in custom function
24 Dec 2023, 14:41
Hello everyone, I want to use my enum list which is used as an input parameter on a custom function to use that list over several input parameters?
My code :
[Parameter("Field Price vs MAs Rule B" , DefaultValue = Rules.AND, Group = "Field Price vs MAs Buy")]
public Rules FPVSMAsRulesB { get; set; }
//----------------------------------------------------------
// drop down option:
public enum Rules
{
AND,
OR,
}
//----------------------------------------------------------
// Function to generate Fps
private bool ANd_OR_Corelation( ?? , bool arr, bool arr1)
{
var retsultrelues = false;
switch (??)
{
case 0:
retsultrelues = ((arr) && (arr1)) ;
break;
case 1:
retsultrelues = ((arr) || (arr1));
break;
}
return retsultrelues ;
}
//----------------------------------------------------------
thanks in advanced
PanagiotisCharalampous
27 Dec 2023, 08:27
Hi there,
Try
Best regards,
Panagiotis
@PanagiotisCharalampous