CSharp examples for System:Array Create
Create Array with default value
using Microsoft.Research.DynamicDataDisplay.Charts; using System.Text; using System.Linq; using System.Collections.Generic; using System;/* w w w .ja v a 2s . c om*/ public class Main{ internal static T[] CreateArray<T>(int length, T defaultValue) { T[] res = new T[length]; for (int i = 0; i < res.Length; i++) { res[i] = defaultValue; } return res; } }