What is the best way to ping a pc with .NET.

I need to edit the registry of a remote pc. The application works but crashes when a PC is not online. How can I easily find out wheater a PC is online, unknown or offline ?

Thanks in advance,

Gette