The purpose of the discussion board is to discuss various topics related to the
ID: 3855907 • Letter: T
Question
The purpose of the discussion board is to discuss various topics related to the readings in order to enhance your understanding. Therefore, it is important that you read discussion board postings, don’t restate what someone has already said, try to further the discussion. It is okay to ask questions, pose ideas, and provide opinions.
Post 4 to 6 paragraphs on ONE of these topics to the week 6 discussion forum by Wednesday evening.
Explain one of the Array class member methods. Provide a simple program demonstrating its use.
OR
What other constructs are available in C# that can provide array-type functionality? Provide examples and discuss them in relation to simple array structures.
Be sure to cite your references.
Explanation / Answer
Array Class Members:
The Array class is nothing but an base class for all the arrays in C#.It is defined in the System namepace.The Array class consists of various other properties and methods which have different features for the arrays.
The members of the array class are as follows:
Hence, these are the eample of the array members.
ArrayExample.cs
using System;
namespace Array;
{
class ArrayExample
{
static void Main(string[] args)
{
int[] li = { 3, 12, 3, 74, 51, 90, 10 };
int[] tempo = li;
Console.Write("Original Array: ");
foreach (int uu in li)
{
Console.Write(uu + " ");
}
Console.WriteLine();
Array.Reverse(tempo);
Console.Write("Reversed Array: ");
foreach (int uu in tempo)
{
Console.Write(uu + " ");
}
Console.WriteLine();
Array.Sort(li);
Console.Write("Sorted Array: ");
foreach (int uu in li)
{
Console.Write(uu + " ");
}
Console.WriteLine();
Console.ReadKey();
}
}
}
Please rate the answer if it helped.....Thankyou
Hope it helps.....
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.