日期:2014-05-18  浏览次数:20767 次

VB.net转C#问题
Public Property MyItem(ByVal Index As Integer) As Object
  Get
  Return DisplayRow.Cells(Index).Value
  End Get
  Set(ByVal value As Object)
  DisplayRow.Cells(Index).Value = value
  End Set
  End Property

请问各位,上面的代码用C#如何实现啊?

------解决方案--------------------
C# code
public object this[int Index]
{
    get { return DisplayRow.Cells[Index].Value; }
    set { DisplayRow.Cells[Index].Value = value; }
}

------解决方案--------------------
C# 单纯的get set 
 楼上的正解