System.Globalization.BaseInfoTable.GetWordArrayArray C# (CSharp) Method

GetWordArrayArray() private method

private GetWordArrayArray ( uint iOffset ) : int[][]
iOffset uint
return int[][]
        internal unsafe int[][] GetWordArrayArray(uint iOffset)
        {
            // if its empty return null
            if (iOffset == 0)
                return new int[0][];
            
            // The offset value is in char, and is related to the begining of string pool.
            // Need short* to get proper negative numbers for negative eras.
            short* pCount = (short*)(m_pDataPool + iOffset);
            int countArrays = (int)pCount[0];    // The number of word arrays in the array
            int[][] values = new int[countArrays][];

            // Get past count and cast to uint to get the pointers to the word arrays
            uint* pWordArrays = (uint*)(pCount + 1);

            // Get our word arrays
            for (int i = 0; i < countArrays; i++)
            {
                pCount = (short*)(m_pDataPool + pWordArrays[i]);
                int count = pCount[0];
                pCount++;                           // Advance past count and reuse for word pointer
                values[i] = new int[count];
                for (int j = 0; j < count; j++)
                {
                    values[i][j] = pCount[j];
                }
            }

            return (values);
        }