Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void add_array(T[] table){
- if(typeof(T) == typeof(bool)){ foreach(bool b in (bool[])table)add(b); }
- else if(typeof(T) == typeof(char)){ foreach(char c in (char[])table)add(c); }
- else if(typeof(T) == typeof(uchar)){ foreach(uchar u in (uchar[])table)add(u); }
- else if(typeof(T) == typeof(int)){ foreach(int i in (int[])table)add(i); }
- else if(typeof(T) == typeof(uint)){ foreach(uint u in (uint[])table)add(u); }
- else if(typeof(T) == typeof(int64)){ foreach(int64 i in (int64[])table)add(i); }
- else if(typeof(T) == typeof(uint64)){ foreach(uint64 u in (uint64[])table)add(u); }
- else if(typeof(T) == typeof(long)){ foreach(long l in (long[])table)add(l); }
- else if(typeof(T) == typeof(ulong)){ foreach(ulong u in (ulong[])table)add(u); }
- else { foreach(var item in table)add(item); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement