How to differentiate FOB file Header information using C#

I want just header information from fob file using stream reader but not sure when to stop reading file.

what is differentiating condition i can use to stop reading once header is completed

One way to do it is to check if the first words is an object i.e. Page, Report etc. and then take that line plus the next.

Thanks So much erik.