Create An Array with Non Default Value
namespace ConsoleApplication8
{
class Program
{
static void Main(string[] args)
{
int[] intArray = Enumerable.Repeat(100, 5).ToArray();
foreach (var x in intArray)
{
Console.WriteLine(x);
}
Console.ReadLine();
}
}
}
No comments:
Post a Comment