The initial step is to import information from a csv document (comma delimited content record) and burden it memory of my program so I can as often as possible access it without opening an outside document each time.
I will likewise have to run inquiries on this information to perform searches and estimations. The item DataTable in ADO.net suits this reason.
Whenever I have made my table I need to characterize the sections I need and the properties of these segments. The outcomes document is in the accompanying arrangement
Host group, Away group, home objectives, away objectives
teamA , Team B, 1, 0
teamD , Team C, 4, 0
teamF , Team E, 1, 1
I will call my table importResultsTable
DataTable importResultsTable = new DataTable(“imported”);
เว็บบอลเชื่อถือได้ What’s more, characterize every one of the sections I need in my table and add it to the table characterized previously.
First make a segment to be added to the table
DataColumn fht = new DataColumn();
Next pick what sort of information the section stores, for a group name it will be a string
fht.DataType = System.Type.GetType(“System.String”);
Next pick what the section making a beeline for show up in the table
fht.ColumnName = “homeTeam”;
lastly add it to our table
This code is rehashed for every segment that is added to our table
DataColumn fat = new DataColumn();
at.DataType = System.Type.GetType(“System.String”);
at.ColumnName = “awayTeam”;
The following two segments are for the objectives scored by each team,these are number sorts.
DataColumn hg = new DataColumn();
hg.DataType = System.Type.GetType(“System.Int32”);
hg.ColumnName = “homeGoals”;
DataColumn ag = new DataColumn();
ag.DataType = System.Type.GetType(“System.Int32”);
ag.ColumnName = “awayGoals”;