全て
| カテゴリ未分類
| 通常
| 数学
| 投資
| 副業
| 転職・就職
| ブログ
| 株Stock
| VBA
| SharePoint
| REST API
| RenderListDataAsStream
| PowerAutomateDesktop
| Graph API
| PowerApps
| PowerAutomate
| PowerFx
| OfficeScriptオフィススクリプト
| PowerAutomate日時Excel日時相互関係
| PowerShell
| Dataverse
| UiPath
| OneDrive
| LINQ
| VB.NET
| C#.NET
| WPFC#.NET
| Git
カテゴリ:LINQ
Imports System Imports System.Data Imports System.Linq Module Program Sub Main(args As String()) ' サンプルのDataTableを作成します Dim table As New DataTable() table.Columns.Add("Column1", GetType(Integer)) table.Columns.Add("Column2", GetType(String)) table.Columns.Add("Column3", GetType(Double)) ' サンプルデータを追加します table.Rows.Add(1, "One", 1.1) table.Rows.Add(2, "Two", 2.2) table.Rows.Add(3, "Three", 3.3) ' LINQを使用して列1、列2、列3を取得します Dim result = From row As DataRow In table.Rows Select New With { .Column1 = row.Field(Of Integer)("Column1"), .Column2 = row.Field(Of String)("Column2"), .Column3 = row.Field(Of Double)("Column3") } ' 結果を出力します For Each item In result Console.WriteLine($"Column1: {item.Column1}, Column2: {item.Column2}, Column3: {item.Column3}") Next End Sub End Module お気に入りの記事を「いいね!」で応援しよう
Last updated
2024.02.25 07:19:38
[LINQ] カテゴリの最新記事
|