Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Dyanmically create datatable in c#

DataTable table = new DataTable();
    table.Columns.Add("Dosage", typeof(int));
    table.Columns.Add("Drug", typeof(string));
    table.Columns.Add("Patient", typeof(string));
    table.Columns.Add("Date", typeof(DateTime));

    // Here we add five DataRows.
    table.Rows.Add(25, "Indocin", "David", DateTime.Now);
    table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
    table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
    table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
    table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# new list of objects 
Csharp :: convert html to pdf c# 
Csharp :: print an array in c# 
Csharp :: c# quit button script 
Csharp :: c# get the first 4 characters in the list 
Csharp :: how to chceck for a tag in a trigger enter 2d unity 
Csharp :: c# create array with n elements 
Csharp :: change size of a unity object 
Csharp :: null check syntax c# 
Csharp :: how to find current country c# 
Csharp :: upload file using httpwebrequest c# 
Csharp :: Show private fields in Unity Inspector 
Csharp :: how to get unique list in c# 
Csharp :: c# html to pdf 
Csharp :: how to add a force to an object unity 
Csharp :: what is void onmousedown() 
Csharp :: how to evaluate code in c# 
Csharp :: how to iterate between hour range in c# 
Csharp :: interpolate rotation unity3d 
Csharp :: sorting list by date time dec in c# 
Csharp :: c# count directories in directory and subdirectories 
Csharp :: get enum value c# 
Csharp :: C# api get value from header 
Csharp :: reverse linked list 
Csharp :: c# loop through datatable and update 
Csharp :: c# iterate sorteddictionary 
Csharp :: two linked list intersection 
Csharp :: c# add strings 
Csharp :: c# fileupload example 
Csharp :: c# generate random int list 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =