VB.NET質問スレ (Part11)
■ このスレッドは過去ログ倉庫に格納されています
0896最凶VB厨房
2005/07/11(月) 17:36:07>なんで出てこないんだろう?
'console app
Option Strict On
Imports System
Imports System.ComponentModel
Imports System.Reflection
Imports System.Windows.Forms
Public Class EntryPoint
Shared Sub Main()
Dim t As Type = GetType(ContextMenu)
Dim p As PropertyInfo = t.GetProperty("Handle", BindingFlags.Instance Or BindingFlags.Public Or BindingFlags.FlattenHierarchy)
Dim os() As Object = p.GetCustomAttributes(False)
Dim o As Object
For Each o In os
Console.WriteLine("カスタム属性:{0}", o.ToString())
Try
Console.WriteLine("Stateの値:{0}", CType(o, EditorBrowsableAttribute).State.ToString())
Catch
End Try
Try
Console.WriteLine("Browsableの値:{0}", CType(o, BrowsableAttribute).Browsable.ToString())
Catch
End Try
Next
Console.WriteLine("ところでSystem.Windows.Forms.SRDescriptionAttributeって何?")
Console.ReadLine()
End Sub
End Class
■ このスレッドは過去ログ倉庫に格納されています