vb.net入門列挙型の定数を利用するサンプル

サンプルコード

Public Enum Cft
	AA = 10
	BB = 11
	CC = 12
End Enum

Module ModuleDemo
	Sub Main()
		For Each a In [Enum].GetNames(GetType(Cft))
			Console.WriteLine(a) 
		Next

		Dim n As Integer
		For Each n In [Enum].GetValues(GetType(Cft))
			Console.WriteLine(n) 
		Next
	End Sub
End Module

 

VB.net

Posted by arkgame