dim aa() as double
public property AA(byval i as inter) as double
{
get
return aa(i)
end get
set(byval value as double)
aa(i)=value
end set
}
怎么转换成c# 参数i怎么传进去
...全文
1018打赏收藏
vb.net转c#
dim aa() as double public property AA(byval i as inter) as double { get return aa(i) end get set(byval value as double) aa(i)=value end set } 怎么转换成c# 参数i怎么传进去
using System;
class IndexerClass
{
private int [] myArray = new int[100];
public int this [int index] // Indexer declaration
{
get
{
// Check the index limits.
if (index < 0 || index >= 100)
return 0;
else
return myArray[index];
}
set
{
if (!(index < 0 || index >= 100))
myArray[index] = value;
}
}
}