Provides connection services for an infrared connection.
Assembly: System.Net.IrDA (in System.Net.IrDA.dll)
This class provides services for an infrared endpoint that includes making connections, obtaining data streams, and discovering devices.
Because of protocol differences, you cannot interactively use the infrared beam features on a Pocket PC with a .NET Compact Framework infrared application. Protocol differences also exist with the built-in infrared features on a laptop or desktop computer.
Infrared connections are made by specifying a service name, which can be any value, provided the participating devices refer the same name.
The following example demonstrates how to send files between devices that use infrared communications. You need two Pocket PCs, one to send the file and the other to receive it. To run this sample, do the following:
Build the example.
Create a text file that is named send.txt in the My Documents folder of the device that will send the file.
Align the infrared ports of the devices.
On both devices, start the IrDADemo.exe application.
On both devices, click Discover for a list of infrared devices within range.
On the device that will receive the file, select the device that will send the file, and then click Receive. You must click this button before you click Send on the sending device.
On the device that will send the file, click the Send button.
The receiving device will receive the file, and the file's contents will be saved to a file named receive.txt in the My Documents folder.
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.