I have a question of realtime aircraft info

EnrouteStruct r = df.Enroute(“ICN”, 3, “enroute”, 0);

    foreach (EnrouteFlightStruct e in r.enroute)
       InFlightAircraftStruct ar = df.InFlightInfo(e.ident);


I accept three enroute aircraft info with inflightinfo method;
but ar.timestamp and ar.longitude equal 0;
then… How can I detect aircraft of flying or stop status?

Not all Enroute flights are in the air, some are just scheduled flights. The idea is that they all have an estimated arrival time.
Some Enroute messages have actualdeparturetime = 0 either because FlightAware does not have enough information to know the precise departure time or they are just scheduled.
You could discard the messages with actualdeparturetime 0 to get the flights that are known to be in air for sure.

You could also use the Search call with inAir 0(must be on ground) or 1 and a ICAO destination code.