public static void Main5() { using (GameLoopForm example = new GameLoopForm()) { //ExampleAttribute info = ((ExampleAttribute)example.GetType().GetCustomAttributes(false)[0]); //example.Text = String.Format("OpenTK | {0} {1}: {2}", info.Category, info.Difficulty, info.Title); example.ShowDialog(); } }
public static void Main() { using (GameLoopForm example = new GameLoopForm()) { // Get the title and category of this example using reflection. ExampleAttribute info = ((ExampleAttribute)example.GetType().GetCustomAttributes(false)[0]); example.Text = String.Format("OpenTK | {0} {1}: {2}", info.Category, info.Difficulty, info.Title); example.ShowDialog(); } }