1  1)哈希表

         定义:(不规定长度,不规定类型,不规定键的类型)

         Hashtable  ht=new hashtable();

         (点击小灯泡用using system.collection)

     2)赋值:

             (1):

                   ht['a']=1;

                    ht[0]="b";

                    ht["b"]='c';

             (2) :

                    ht.Add(1,d);               :相当于ht[1]=d

    哈希表遍历 :

          1)        foreach(var x in ht.keys )

               {

                  console.write(x)

              }                                                                      :显示为ht 的被赋值的内容也就是a,0,b,1

            2)     foreach( var x in ht.values)

           {

                console.write(x)

            }                                                                       :显示为赋的值即:1,b,c,d

 2 队列集合:(先进先出)

        1)定义:    Queue Line=new Queue();

         2)赋值:    line.Enque("a");

                             line.Enque("b");

                             line.Enque("c");

         3)读取  console.writeline(line.Dequeue());                  :写几个显示几个

                        console.writeline(line.Dequeue());

                        console.writeline(line.Dequeue());

                        console.read()

    3 栈集合:先进后出

               定义:     stack<string>st= new stack<string>();

                赋值:  st.push(“7.62”);

                             st.push("5.56");

                             st.push("9");

                        console.writeline(st.pop());                              弹出

                        console.read

           

    4 自定义函数:访问修饰符  函数名(参数)

                           {

                                 函数体;

                                    return  返回值;

                           

                            }

             1)无参数,无返回值:

                      public  static  void   abc()                 :无返回值需在static后跟VOID

                  { 

                         console.writeline("我是函数")

                   }

               2) 无参数,有返回值 :

                       public  static    string  abc()                       :必须在static后跟返回值类型        

                       {

                       return"abc";

                         } 

               3)  有参数 ,无返回值:

                      pubic   static  void   abc(int a,int b)

                     {

                            console.writeline(a+b)

                    } 

                 4) 有参数,有返回值:

 

 

 

          5 结构体:

               1) 定义:   struct  b

                 {

                    public   int  j

                 }

               2)结构体实体化

                    b  j1=new b();

                    j1.j=1;