private static void WriteMeasurementMode(string portName, SmlComServiceClient proxy, Guid clientGuid, string measurementMode) { Console.WriteLine("Setting measurement mode to: " + measurementMode); proxy.WriteMeasurementMode(clientGuid, portList.FirstOrDefault(m=> m.ComPortName == portName), measurementMode); var result = proxy.ReadMeasurementMode(clientGuid, portList.FirstOrDefault(m => m.ComPortName == portName)); Console.WriteLine("Measurement mode read: MM" + result.Data.Value); Console.WriteLine(); }