Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Gamedat
- {
- public string[] Games
- {
- get;
- set;
- }
- public string[] Gtypes
- {
- get;
- set;
- }
- public Dictionary<string, int[]> Playdata
- {
- get;
- set;
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Gamedat dataframe = new Gamedat();
- dataframe.Games = new string[] { "Game 1", "Game 2", "Game 3", "Game 4", "Game 5" };
- dataframe.Gtypes = new string[] { "A", "B", "C", "B", "A" };
- dataframe.Playdata = new Dictionary<string, int[]>();
- //Add dictionary items
- int[] a = { 1, 0, 3, 4, 0 };
- int[] b = { 3, 0, 9, 10, 0 };
- int[] c = { 2, 3, 3, 5, 0 };
- dataframe.Playdata.Add("Jack", a);
- dataframe.Playdata.Add("Jane", b);
- dataframe.Playdata.Add("James", c);
- }
- public class Gamedat
- {
- public string Games
- { get;set;
- }
- public string Gtypes
- {get; set;
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- List<Gamedat> dataframe = new Gamedat();
- dataframe.Games = new List<string> { "Game 1", "Game 2", "Game 3", "Game 4", "Game 5" };
- dataframe.Gtypes = new List<string> { "A", "B", "C", "B", "A" };
- var result = dataframe.OrderBy(x => x.Gtypes)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement