要求 FileStream 打开一个不是文件的设备。如果需要对“com1:”或“lpt1:”等设备的支持,请调用 CreateFile,然后使用采用 OS 句柄作为 IntPtr 的 FileStream 构造函数。
Click to search this error in Google
English version
FileStream was asked to open a device that was not a file. For support for devices like 'com1:' or 'lpt1:', call CreateFile, then use the FileStream constructors that take an OS handle as an IntPtr.