You can use generics to make to an adjustable size (depth and width).  It is almost always worth it for something this simple.