Exemple #1
0
        private static IArrayCreationExpression CreateArrayCreationExpression(IType elementType, CSharpElementFactory factory)
        {
            IArrayCreationExpression expression = (IArrayCreationExpression)factory.CreateExpression("new[]{}", new object[0]);
            IArrayType arrayType = TypeFactory.CreateArrayType(elementType, 1, null);

            return(factory.CreateArrayCreationExpression(arrayType, expression.ArrayInitializer));
        }