Parameter Array In C Sharp
This program descirbe the concept of Parameter Array in C#
-------------------------------------------------------------
using System;
class ParameterArray
{
static void Main()
{
int a;
int[] b = {1,2,3,4,5,6,7,8,9,10};
CountArrayLength(out a,b);
Console.WriteLine("The length of b array is " + a);
}
static void CountArrayLength(out int a, params int[] b)
{
a = b.Length; //Length is a property of an array.
}
}
-------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
Parameter Array In C Sharp
Reviewed by Baljeet Singh
on
02:23
Rating:
No comments: