Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Generics
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public class EntityNotFoundException<T> : Exception {} public class EntityStore<T> { public T GetEntity(int key) { throw new EntityNotFoundException<T>(); } } public class PlayerEntity {} //... public static void Main(string[] args) { EntityStore<PlayerEntity> entityStore = new EntityStore<PlayerEntity>(); try { entityStore.GetEntity(6); } catch (EntityNotFoundException<PlayerEntity>) { Console.WriteLine("Player not found."); } catch (Exception) { Console.WriteLine("Unexpected error."); } } } }
run
|
edit
|
history
|
help
0
T
OOOO1
code
Exception
DASX
a4
newDiv2by1
Gamez
Сортировка массива
transform string to hex code