안녕하세요..
이부분은 VB.NET으로 프로퍼티가 여러 개 정의가 가능한걸로 알고 있습니다.. 혹시 C#에서도 가능하지 알고 싶습니다.
혹시 가능하다면... 간단한 예제좀 부탁합니다..
(예제 : VB.NET)
Public Property Item(ByVal Index As Integer) As SessionItem
Get
Return CType(Me.List(Index), SessionItem)
End Get
Set(ByVal value As SessionItem)
Me.List(Index) = value
End Set
End Property
Public Property Item(ByVal oSessionItem As SessionItem) As SessionItem
Get
Return CType(List(List.IndexOf(oSessionItem)), SessionItem)
End Get
Set(ByVal value As SessionItem)
List(List.IndexOf(oSessionItem)) = value
End Set
End Property
Public ReadOnly Property Item(ByVal oTag As String)
Get
For Each oSessionItem As SessionItem In Me
If oSessionItem.Tag = oTag Then
Return oSessionItem
End If
Next
Return Nothing
End Get
End Property
[최초 등록일: ]
[최종 수정일: 12/5/2006]