Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

c# sort word

static char[] sortWord (string word)
{
    char[] result = word.ToCharArray ();
    char temp = '0';
    for (int i = 0; i < result.Length; i++)
    {
        // baa
        for(int j = 0; j < result.Length; j++)
        {
            if ((int)result[i] < (int)result[j])
            {
                temp = result[j];
                result[j] = result[i];
                result[i] = temp;
            }
            Console.WriteLine("I: " + result[i] + " J: " + result[j]);
        }
    }
    return result;
}
Comment

c# sort word

char[] result = word.ToCharArray ();
Array.Sort(result);

Console.WriteLine(result);
Comment

PREVIOUS NEXT
Code Example
Csharp :: Options Pattern how to use 
Csharp :: c# change chart legend font size 
Csharp :: c# linq where value is max and one item 
Csharp :: c# please build the project and retry 
Csharp :: c# fastest way to find item in list 
Csharp :: c# run foreach loop x times 
Csharp :: ExceptionFilterAttribute exception-handler-middleware-not-catching 
Csharp :: params keycord as var name c# 
Csharp :: asp.net mvc table array binding arbitrary indices 
Csharp :: .netstandard distinctby iqueryable 
Csharp :: c# read only file used by other app 
Csharp :: set data annotation in model c# 
Csharp :: how to select class object from query c# 
Csharp :: c# dictionary contain key but returns false 
Csharp :: identity-1.us-south.iam.test.cloud.ibm.com:443 
Csharp :: C# is folder 
Csharp :: c# check word length 
Csharp :: cache.TryGetValue in MemoryCache c# .net 
Csharp :: c# dubble comment 
Csharp :: C# count specific words in string 
Csharp :: how to get the size of an array in c# 
Csharp :: unity c# bool to int conversion 
Csharp :: convert memorystream to byte array c# 
Csharp :: linq where c# 
Csharp :: c# download file from url 
Csharp :: c# array inst working 
Csharp :: how to remove black top bar in asp.net 
Html :: html yen symbol 
Html :: copyright footer html code 
Html :: html input not editable 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =