My psychic debugging skills tell me that your function is an iterator function, meaning that it contains yield return;
statements.
Code in iterator functions is only executed as the result is iterated.
This is called deferred execution.
4
solved Why my code did not get into my function [closed]