This is my function:
IEnumerable<Packet> packets = splitPacket(packet, 2);
public static IEnumerable<Packet> splitPacket(Packet packet, int numberOfFragments)
{
//
}
I am calling this function but for some reason my code did not get into my function.
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.