c# loop string array
//Using Linq to itterate over an array
var strArr = new string[4] {"one", "Two", "Three", "Four"};
Console.WriteLine(strArr.Select((s, i) => $"Item no: {i + 1}, Value: {s}")); string[] arr = new string[4]; // Initialize.
arr[0] = "one"; // Element 1.
arr[1] = "two"; // Element 2.
arr[2] = "three"; // Element 3.
arr[3] = "four"; // Element 4.
// Loop over strings.
foreach (string s in arr)
{
Console.WriteLine(s);
}
Also in C#:
- unity check when clicked on object
- c# shorten an definition
- c# checksum
- instantiate offset unity
- c# object clone
- c# program exit
- c# discord bot
- populate combobox from array c#
- unity array of child objects
- c# trim string
- c# random number between 0 and 1
- c# tab character
- check if two timespans intersect c#
- how to create a list c#
- string isnullorempty vs isnullorwhitespace
- c# string to character array
- c# variable
- how to move clipping planes C# in unity
- c# Sleep
- Instantiate c#
- get random value from list c#
- get all child gameObject of gameObject C#
- sticky footer bootstrap 3