VB.NET質問スレ
■ このスレッドは過去ログ倉庫に格納されています
0072デフォルトの名無しさん
2007/09/11(火) 19:16:04Structure struct2
Dim a, b, c As String
Dim uniqueID As Integer
End Structure
Module Program
Private structAry As struct2()
Sub Main
ReDim structAry(3)
structAry(0).uniqueID = 1
structAry(0).a = "a1"
: 略
structAry(2).c = "c3"
Dim rslt As struct2 = Array.Find(structAry, AddressOf MyProduct)
Console.WriteLine("{0} : {1}, {2}, {3}", rslt.uniqueID, rslt.a, rslt.b, rslt.c)
End Sub
Function MyProduct(ByVal st2 As struct2) As Boolean
Return st2.uniqueID = 2
End Function
End Module
■ このスレッドは過去ログ倉庫に格納されています