public Attribute this[int index],this[int
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/12 09:34:36
public Attribute this[int index],this[int
怎么用?
怎么用?
对象自身索引的意思.
public class MyCollection
{
private List m_list;
public MyCollection()
{
m_list = new List();
}
public void Add(Attribute item)
{
m_list.Add(item);
}
public Attribute this[int index]
{
get { return m_list[index]; }
}
static void Main()
{
MyCollection mc = new MyCollection();
mc.Add(new ObsoleteAttribute());
mc.Add(new WebMethodAttribute());
Attribute atti = mc[1]; //WebMethodAttribute
}
}
public class MyCollection
{
private List m_list;
public MyCollection()
{
m_list = new List();
}
public void Add(Attribute item)
{
m_list.Add(item);
}
public Attribute this[int index]
{
get { return m_list[index]; }
}
static void Main()
{
MyCollection mc = new MyCollection();
mc.Add(new ObsoleteAttribute());
mc.Add(new WebMethodAttribute());
Attribute atti = mc[1]; //WebMethodAttribute
}
}
public Attribute this[int index],this[int
class A{ int a; public:A(const A& rhs){.} A b=(*this);//////
SoapObject.getProperty(int index) 其中 index表示什么意思
函数返回一个指针,格式怎么写?(int*this或char*this) return *this return this
public class test(){ public Class a(int i) {} public static
java语句class Bird{int x,y; void fly(int x, int y) {this.x=x;
求水仙花数#include#includemain(){int x,y;int n,z,m;int temp,index
class B { int i; B(int i) { this.i = i; } } class C extends
class A{int i,j;public:static int x;public:A(int a = 0,int b
英语翻译At this point stanardisation and certification comes int
英语翻译This original concept of complementarities was first int
public static int AddTbl_CityAgent(Tbl_CityAgent tbl_cityage