zoukankan      html  css  js  c++  java
  • IComparable

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.IO.Ports;
    using DeviceMonitor.DBUtility;
    using DeviceMonitor.RealData;
    using System.Collections;
    using System.Diagnostics;

    namespace DeviceMonitor
    {
        /// <summary>
        
    /// 串口扩展类,继承SerialPort类
        
    /// </summary>
        public class SerialPortExpand : SerialPort,IComparable
        {
            /// <summary>
            
    /// 组件构造函数
            
    /// </summary>
            public SerialPortExpand()
            {
            }
            /// <summary>
            
    /// 实现IComparable接口
            
    /// </summary>
            
    /// <param name="obj"></param>
            
    /// <returns></returns>
            public int CompareTo(object obj)
            {
                SerialPortExpand target = (SerialPortExpand)obj;

                return this.PortName.CompareTo(target.PortName);
            }
        }
    }
  • 相关阅读:
    Problem 3
    Problem 2
    Problem 1
    Python基础 装饰器
    算法——狄克斯特拉算法
    A Knight's Journey POJ 2488
    多校10 1007 CRB and Queries
    多校9 1007 Travelling Salesman Problem
    多校8 1008 Clock
    多校7 1005 The shortest problem
  • 原文地址:https://www.cnblogs.com/zhangpengshou/p/2355702.html
Copyright © 2011-2022 走看看