0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

主要型のDataType.FullName

Posted at

概要

数年ぶりのQiitaだけど、超しょーもない糞メモです。
自分でDataTableからSQLiteのテーブルに置き換えるコードを作る際のSQL側のテーブル定義を作るときに、
カラムの型をどう判定するかで使うために調べたメモです。

結果

Windows10 64bit PC
コンパイルは32bit

Module Module1

	Sub Main()
		Dim dt As New DataTable("dt")
		dt.Columns.Add("String", Type.GetType("System.String"))
		dt.Columns.Add("Double", Type.GetType("System.Double"))
		dt.Columns.Add("Int32", Type.GetType("System.Int32"))
		dt.Columns.Add("Int64", GetType(Int64))
		dt.Columns.Add("Integer", GetType(Integer))

		Console.WriteLine($"
		String:{dt.Columns("String").DataType.FullName} 
		Double:{dt.Columns("Double").DataType.FullName} 
		Int32:{dt.Columns("Int32").DataType.FullName} 
		Int64:{dt.Columns("Int64").DataType.FullName} 
		Integer:{dt.Columns("Integer").DataType.FullName}
		")
	End Sub

End Module
                String:System.String
                Double:System.Double
                Int32:System.Int32
                Int64:System.Int64
                Integer:System.Int32

続行するには何かキーを押してください . . .
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?