Horje
c# loop string array Code Example
c# loop through array
//iterate the array
for (int i = 0; i < arr.Length; i++)
{
  // loop ...
}
// or
foreach (var element in arr)
{
  // loop ...
}
loop through string array c#
 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);
        }
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}"));




Csharp

Related
c# get last array element Code Example c# get last array element Code Example
what is type unity Code Example what is type unity Code Example
C# array to string Code Example C# array to string Code Example
c# console header Code Example c# console header Code Example
unity no serializefield Code Example unity no serializefield Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7