12-14-2021
06:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-14-2021
06:37 AM
I tried adding the HandlingCode, but I get two errors on the if statement:
- Error CS0269 Use of unassigned out parameter
- Error CS0177 The out parameter 'HandlingCode' must be assigned to before control leaves the current method
private void OnChange(_Document DocumentObject, EventTimingEnum BeforeOrAfter, CommandTypesEnum ReasonsForChange, NameValueMap Context, out HandlingCodeEnum HandlingCode)
{
if (HandlingCode == HandlingCodeEnum.kEventHandled) { return; } //Error happens on this line
HandlingCode = HandlingCodeEnum.kEventNotHandled;
//DO SOMETHING
HandlingCode = HandlingCodeEnum.kEventNotHandled;
}
Settings EventNotHandled before the if statement is not a solution I guess. In that case the if statement will always fail.