首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

VB.net转C#有关问题

2012-04-24 
VB.net转C#问题Public Property MyItem(ByVal Index As Integer) As ObjectGetReturn DisplayRow.Cells(In

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 
 楼上的正解

热点排行