This method waits for a pipe instance to become available. erload:System.IO.Pipes.NamedPipeClientStream.Connect might return before NamedPipeServerStream.WaitForConnection is called from the System.IO.Pipes.NamedPipeServerStream, but NamedPipeServerStream.WaitForConnection will not return until erload:System.IO.Pipes.NamedPipeClientStream.Connect has returned. You set the timeout parameter to System.Threading.Timeout.Infinite to specify an infinite time-out value.
Any data written to the pipe after a System.IO.Pipes.NamedPipeClientStream object has connected, but before the server has called NamedPipeServerStream.WaitForConnection, will be available to the server following the call to NamedPipeServerStream.WaitForConnection.