Horje
c# find the smallest string in an array of strings Code Example
c# find the smallest string in an array of strings
string[] names = new string[3]{
     "Tom", "and", "jerry"
};

string minValue = names[0];
foreach (string name in names)
{
     if (name.Length < minValue.Length)
     {
          minValue = name;
     }
}

Console.WriteLine(minValue);




Csharp

Related
GetNetworkTime Code Example GetNetworkTime Code Example
dapper c# insert range Code Example dapper c# insert range Code Example
how to check if every element in array is true c# Code Example how to check if every element in array is true c# Code Example
asp net core dependency injection factory with parameters Code Example asp net core dependency injection factory with parameters Code Example
c# .net set exception data Code Example c# .net set exception data Code Example

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