Thursday, November 30, 2023

c# - How to call custom event

1) Custom event without parameters:
public Action OnBeforeEvaluationEvent;
...
if ( OnBeforeEvaluationEvent != null ) OnBeforeEvaluationEvent();
2) Custom event with parameter(s):
public delegate void OnAfterEvaluatingDelegate( CodeConditionGroup _conditionGroup );    
public event OnAfterEvaluatingDelegate OnAfterEvaluationgEvent;

if ( OnAfterEvaluationgEvent != null ) OnAfterEvaluationgEvent( condition );

No comments:

Post a Comment