Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.29 KB | None | 0 0
  1.     public void AddComponent(Type type)
  2.     {
  3.         var genericType = typeof(ComponentSetup<>);
  4.         var makeme = genericType.MakeGenericType(type);      
  5.         Components.Add(type, Activator.CreateInstance(makeme));
  6.     }
  7.  
  8.     public class ComponentSetup<T>
  9.     {
  10.         //coÅ› tam
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement