Advertisement
tolikpunkoff

test data set code

Nov 24th, 2018
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. using System.Data;
  2. using System.Diagnostics;
  3.  
  4. namespace tmpDataSet
  5. {
  6.     public enum testenum
  7.     {
  8.         val0=0,
  9.         val1=1
  10.     }
  11.     public static class dataclass
  12.     {
  13.         static DataSet dsTest = new DataSet();
  14.  
  15.         public static void Test()
  16.         {
  17.             dsTest.Tables.Add("Test");
  18.             dsTest.Tables["Test"].Columns.Add("Text", typeof(string));
  19.             dsTest.Tables["Test"].Columns.Add("Enum", typeof(testenum));
  20.             dsTest.Tables["Test"].Columns.Add("Enum2", typeof(ProcessWindowStyle));
  21.  
  22.             dsTest.Tables["Test"].Rows.Add("Test Row0", testenum.val0, ProcessWindowStyle.Hidden);
  23.  
  24.             //...
  25.         }
  26.        
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement