Public Class ClassWithIndexe r
Private x As Integer()
Public Default Property Item(ByVal index As Integer) As Integer
Get
Return x(index)
End Get
Set
x(index) = Value
End Set
End Property
End Class
The above VB code is the equivalent for the following C# code:
public class ClassWithIndexe r
{
private int[] x;
public int this[int index]
{
get
{
return x[index];
}
set
{
x[index] = value;
}
}
}
--
David Anton
Public Class ClassWithIndexe r
Private x As Integer()
Public Default Property Item(ByVal index As Integer) As Integer
Get
Return x(index)
End Get
Set
x(index) = Value
End Set
End Property
End Class
>
The above VB code is the equivalent for the following C# code:
public class ClassWithIndexe r
{
private int[] x;
public int this[int index]
{
get
{
return x[index];
}
set
{
x[index] = value;
}
}
}
--
David Anton
Comment