The first step is the same, we start by constructing an NMEA sentence parser. But then, we add a GGA Listener. The function connected to this event (Print String in the given example) will be called every time that the NMEA sentence parser will parse a GGA sentence. The main benefit here is that we know that the parameter passed to the event is of type GGA sentence, so we don’t have to downcast the object.
Eventually we can remove the listener after, to prevent further calls.
Also note that the listener must be added before a call to Parse.