本文整理汇总了VB.NET中System.Reflection.FieldInfo.IsAssembly属性的典型用法代码示例。如果您正苦于以下问题:VB.NET FieldInfo.IsAssembly属性的具体用法?VB.NET FieldInfo.IsAssembly怎么用?VB.NET FieldInfo.IsAssembly使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Reflection.FieldInfo
的用法示例。
在下文中一共展示了FieldInfo.IsAssembly属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Example
' 导入命名空间
Imports System.Reflection
Public class Example
Public f_Public As Integer
Friend f_Friend As Integer
Protected f_Protected As Integer
Protected Friend f_Protected_Friend As Integer
Public Shared Sub Main()
Console.WriteLine(vbCrLf & _
"{0,-30}{1,-18}{2}", "", "IsAssembly", "IsFamilyOrAssembly")
Console.WriteLine("{0,-21}{1,-18}{2,-18}{3}" & vbCrLf, _
"", "IsPublic", "IsFamily", "IsFamilyAndAssembly")
For Each f As FieldInfo In GetType(Example).GetFields( _
BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.Public)
Console.WriteLine("{0,-21}{1,-9}{2,-9}{3,-9}{4,-9}{5,-9}", _
f.Name, _
f.IsPublic, _
f.IsAssembly, _
f.IsFamily, _
f.IsFamilyOrAssembly, _
f.IsFamilyAndAssembly _
)
Next
End Sub
End Class
输出:
IsAssembly IsFamilyOrAssembly IsPublic IsFamily IsFamilyAndAssembly f_Public True False False False False f_Friend False True False False False f_Protected False False True False False f_Protected_Friend False False False True False