Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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);
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# half hour dropdown list 
Csharp :: how to unfocus a richtextbox windows forms 
Csharp :: accord.io read .mat file 
Csharp :: insert keys automatically dictionary in c# 
Csharp :: c# hardcode datetime quoting 
Csharp :: bash clean-up code 
Csharp :: How to keep line breaks in SQL Server using ASP.NET and C#? 
Csharp :: reference variable from another script "winforms" c# 
Csharp :: What is the best way to lock cache in asp.net? 
Csharp :: add new page itext 7 
Csharp :: using selected item in listbox c# to fill texbox 
Csharp :: make character move upward forever unity 2d 
Csharp :: process run teamviewer address parametr c# 
Csharp :: pun 2 matchmaking custom room properties 
Csharp :: c# get buttons row and column in grid 
Csharp :: asp.net core user.identity.name is null 
Csharp :: c# picturebox zoom 
Csharp :: range to 01 
Csharp :: unity remove all child 
Csharp :: two question marks c# 
Csharp :: Close Form After fixed time 
Csharp :: linq select distinct 
Csharp :: parse persian date string to datetime c# 
Csharp :: Get the Default gateway address c# 
Csharp :: how can i only show just a part of alist in datagridview in c# 
Csharp :: windows forms webbrowser goback 
Csharp :: linq top selling products 
Csharp :: Precision comparison in C# 
Csharp :: c# how to start an application and detect if started 
Csharp :: C# string go to line 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =