绝对可以编译使用 串口通讯类: using System; using System.Runtime.InteropServices; namespace JustinIO { class CommPort { public string PortNum; public int BaudRate; public byte ByteSize; public byte Parity; // 0-4=no,odd,even,mark,space public byte StopBits; // 0,
并口操作组件。 using System; using System.Runtime.InteropServices; public class PortAccess { [DllImport("inpout32.dll", EntryPoint="Out32")] public static extern void Output(int adress, int value); [DllImport("inpout32.dll", EntryPoint="Inp32")] public sta