ObjectWithReallyLongName [] array = new ObjectWithReallyLongName [] { new ObjectWithReallyLongName(...), ... }
We can use generics to create a function:
public T[] Array<T> ( params T[] array )
{
return array;
}
used
ObjectWithReallyLongName [] array = Array(new ObjectWithReallyLongName(...), ...);
Seems to read better too.
No comments:
Post a Comment