zoukankan      html  css  js  c++  java
  • 泛型

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
     
    namespace ConsoleApplication2
    {
       public class MyList<T>
        {
          private static int objCount = 0;
             public MyList()
          {
                 objCount++; 
             }
          public int Count
          {
           get{return objCount; }
          }
         }
        class Program
        {
            class SampleClass {}
            class MyClass
            {
                
            }
            static void Main(string[] args)
            {
               // Console.WriteLine(new MyList<SampleClass>().Count); 
                MyList<double> myDoubleList5 = new MyList<double>();
                MyList<double> myDoubleList6 = new MyList<double>();
                MyList<int> myIntList1 = new MyList<int>();
                MyList<int> myIntList2 = new MyList<int>();
                MyList<double> myDoubleList7 = new MyList<double>();
                MyList<int> myIntList22 = new MyList<int>();
              Console.ReadLine();
                  }
    }
     
    }
    
  • 相关阅读:
    关于<asp:checkBoxList>控件的对齐方法
    heckboxlist详细用法、checkboxlist用法、checkboxlist
    layoutit note
    查看linux启动的线程信息
    【转】如何修改maven工程jdk版本
    开源bug管理工具-Cynthia
    linux系统相关、硬件、资源
    Nginx文件服务器配置
    windows安装zookeeper单机版
    centos安装nginx
  • 原文地址:https://www.cnblogs.com/bingguang/p/3155103.html
Copyright © 2011-2022 走看看