---
title: "Making an array of arrays"  
description: "Making an array of arrays"  
author: "Anonymous User"  
published: 2011-03-05  
updated: 2011-03-05  
canonical: https://www.mindstick.com/forum/186/making-an-array-of-arrays  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Making an array of arrays

I need to implement an [array](https://www.mindstick.com/articles/335/jagged-array-in-c-sharp-dot-net) of [arrays](https://www.mindstick.com/articles/11955/arrays-and-its-limitations) which are [Textbox](https://www.mindstick.com/forum/12714/dynamic-textbox-in-gridview) so that I can reuse some of the [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) by being able to pass this array of arrays.\
\
I have [functions](https://www.mindstick.com/forum/160140/explain-the-role-of-functions-as-a-service-faas-in-serverless-computing) that take a Textbox as a parameter.

## Replies

### Reply by John Smith

You can check this link also..\
http://www.mindstick.com/Articles/1b8bb376-f49f-4be4-9abf-7aeccf44f809/?Array%20in%20C%20NET\

### Reply by Uttam Misra

To declare an array of arrays (as opposed to a 2D array) in C# requires syntax such as the following. It's assumed that tbArray0 to tbArray15 are single dimensional arrays of length 16 though they can be of any length:\
\
TextBox[][] tbArrays = new TextBox[16][];\
tbArrays[0] = tbArray0;\
tbArrays[1] = tbArray1;\
//..\
tbArrays[15] = tbArray15;\
\
To pass such an array to a function requires a declaration such as:\
\
void SomeFunc(TextBox[][] tbArrays)\
\
The first element of the first array can then be accessed with the expression tbArray[0][0] and the last element of the last array with tbArray[15][15].


---

Original Source: https://www.mindstick.com/forum/186/making-an-array-of-arrays

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
