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#如何实现啊?
[解决办法]
public object this[int Index]{ get { return DisplayRow.Cells[Index].Value; } set { DisplayRow.Cells[Index].Value = value; }}
[解决办法]
C# 单纯的get set
楼上的正解