How to determine if path passes through tagged area?

Fairly simple question i hope, how to determine if a path contains nodes with a certain tag?

Simple:

int tagNumber = 4; Path mypath = ...; bool containsTag = false; for (int i=0;i<mypath.nodes.Count;i++) { if (mypath.nodes[i].tags == tagNumber) { containsTag = true; break; } }

And simple it was, for some reason id got it into my head i had to build another array with Trace.
Thank you!