C# indexed property

Unlike VB.net C# does not support a property with index.
VB.net you can define a property like

Public Property Hoge(Index as Integer) as String
    Get
        Return mHoge(Index)
    End Get
    Set
        mHoge(Index) = Value
    End Set
End Property

But you can do something like

public class IndexableProperty<T>
{
    private T[] mData;
    public IndexableProperty(T[] data){
        this.mData = data;
    }
    public T this[int index] {
        get
        {
            return mData[index];
        }
        set
        {
            mData[index] = value;
        }
    }
}

Then use this class for the property you want to have an index.

public class HogeHoge
{
    private string[] myData;
    private IndexableProperty<string> mHoge;
    public IndexableProperty<string> Hoge
    {
        get {
            if (mHoge == null){
                mHoge = new IndexableProperty(myData);
            }
            return mHoge;
        }
    }
}