Dim name = GetDisplayName(Of ClassA)(NameOf(ClassA.Alpha))
Dim name = GetDisplayName(Of ClassA)("Alpha")
For Each prop In GetType(ClassA).GetProperties() '属性取得 Dim att = prop.GetCustomAttribute(GetType(DisplayNameAttribute)) If att Is Nothing Then Continue For End If 'キャストして属性値取得 Dim name = CType(att, DisplayNameAttribute).DisplayName Debug.WriteLine($"{prop.Name}: {name}") Next