MakeToday的专栏

蓝色忧郁

索引代码
using System;
public delegate void ww();
class a
{public static void write()
 {Console.WriteLine("assisn is used");}
}
class hello1
{
private int[] qq;
private int length=0;
private int test;
public int p1{
    set
    {test=value;
    }
    get
    {return test;
    }
}

public hello1(){
length=-1;
}
public const int LENGTH=5;
public void setlength(int length)
{if(length>0){
   this.length=length;
   qq=new int[length];
  }
}

public int getlength(){
return length;
}


//索引 ,this属性
public int this[int i]
{ set{qq[i]=i;
    }
 get{return qq[i];
}



}

static void Main(string[] args) {
 int i;
String[] array1;
array1=new String[args.Length];
array1=args;
       Console.WriteLine("hello1");
          Console.WriteLine("this reviec {0} args",args.Length);
for (i=0;i<args.Length;i++)
       Console.WriteLine("args[{0}]={0}",i,array1[i]);

  //foreach(String s in args)
 // Console.WriteLine(s); 
Console.WriteLine(hello1.LENGTH.ToString())    ;
hello1 hh=new hello1();
hh.setlength(5);
for(i=0;i<5;i++)
hh[i]=i;

for (i=0;i<hh.getlength();i++)
    Console.WriteLine(hh[i]);
//hh.write();
hh.test=6;
Console.WriteLine(hh.test);
ww q=new ww(a.write);
q();
}
}
阅读更多
文章标签: string qq class system
个人分类: c# .NET
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

索引代码

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭