I agree with Flyguy and Atma, but rather than hold my tongue, I'll share this borrowed/modified example (since I've already looked into it):
Code:
Imports System
Imports System.Reflection
Public Class Form1
Public Structure StrFolder
Public isActive As Boolean
Public NameFolder As String
Public URLIDNumber As Integer
Public DateOfFolder As String
Public NameDescription As String
Public NameLocation As String
End Structure
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim test As StrFolder
Dim i As Integer
test.isActive = True
Dim myType As Type = test.GetType
Dim myField As FieldInfo() = myType.GetFields() 'Get the fields from my() 'type'
For i = 0 To myField.Length - 1
Debug.Print(myField(i).Name)
Debug.Print(myField(i).FieldType.Name)
Next i
End Sub
End Class
|
__________________
"May the code that you write never work in ways that you didn't expect; and may the code that you didn't write never require you to maintain it". - Ancient Chinese Proverb
|