Click here to Skip to main content
15,910,773 members
Home / Discussions / C#
   

C#

 
AnswerRe: Finding unsuccessful updates Pin
Ricardo Casquete27-Mar-06 5:31
Ricardo Casquete27-Mar-06 5:31 
QuestionHow to cast an int to a String [novice] Pin
Inkimar27-Mar-06 4:29
Inkimar27-Mar-06 4:29 
AnswerRe: How to cast an int to a String [novice] Pin
Jimbo2227-Mar-06 4:38
Jimbo2227-Mar-06 4:38 
AnswerRe: How to cast an int to a String [novice] Pin
Stanciu Vlad27-Mar-06 4:59
Stanciu Vlad27-Mar-06 4:59 
QuestionC# for PDA Pin
hung_ngole27-Mar-06 4:02
hung_ngole27-Mar-06 4:02 
AnswerRe: C# for PDA Pin
Judah Gabriel Himango27-Mar-06 4:15
sponsorJudah Gabriel Himango27-Mar-06 4:15 
QuestionProblems with File Download Pin
SreekanthJ27-Mar-06 3:51
SreekanthJ27-Mar-06 3:51 
GeneralRe: Problems with File Download Pin
Guffa27-Mar-06 7:09
Guffa27-Mar-06 7:09 
QuestionPlease help about TableAdapter Pin
emran83427-Mar-06 3:32
emran83427-Mar-06 3:32 
QuestionLocalization Issue Pin
adityap27-Mar-06 3:13
adityap27-Mar-06 3:13 
AnswerRe: Localization Issue Pin
Ricardo Casquete27-Mar-06 4:24
Ricardo Casquete27-Mar-06 4:24 
QuestionTextbox enter Pin
Dave McCool27-Mar-06 2:57
Dave McCool27-Mar-06 2:57 
AnswerRe: Textbox enter Pin
albCode27-Mar-06 3:11
albCode27-Mar-06 3:11 
AnswerRe: Textbox enter Pin
Jimbo2227-Mar-06 5:06
Jimbo2227-Mar-06 5:06 
AnswerRe: Textbox enter Pin
Ricardo Casquete27-Mar-06 5:07
Ricardo Casquete27-Mar-06 5:07 
QuestionProblem in using Timers Pin
smadan27-Mar-06 2:56
smadan27-Mar-06 2:56 
AnswerRe: Problem in using Timers Pin
BlackDice27-Mar-06 7:25
BlackDice27-Mar-06 7:25 
QuestionRe: Problem in using Timers Pin
smadan27-Mar-06 18:49
smadan27-Mar-06 18:49 
QuestionAnagram Algorithm Pin
martin_hughes27-Mar-06 2:38
martin_hughes27-Mar-06 2:38 
AnswerRe: Anagram Algorithm Pin
leppie27-Mar-06 3:32
leppie27-Mar-06 3:32 
AnswerRe: Anagram Algorithm Pin
Michael Potter27-Mar-06 3:32
Michael Potter27-Mar-06 3:32 
I have done this in the past for a Scrabble solver. You can uncomment the line; //retval.Add(current); if you want to see all possible sequences for a scrabble type solution (i.e. solutions that don't use all of the letters). If your word contains duplicate letters, you will have to sort the returned array and take out the duplicate string results.

private List<string> GetAllSequences(string str)
{
    List<string> retval = new List<string>();
    if (str.Length > 0)
    {
        if (str.Length == 1)
        {
            retval.Add(str);
        }
        else
        {
            string current;
            string theRest;
            for (int i = 0; i < str.Length; i++)
            {
                current = str.Substring(i, 1);
                //retval.Add(current); 
                theRest = str.Remove(i, 1);
                foreach (string appender in GetAllSequences(theRest))
                {
                    retval.Add(current + appender);
                }
            }
        }
    }
    return retval;
}

Questionembed flash object? Pin
Dave McCool27-Mar-06 2:23
Dave McCool27-Mar-06 2:23 
QuestionDataGrid, WinForm - how do I set column width to &quot;AutoFit&quot;? Pin
devvvy27-Mar-06 1:40
devvvy27-Mar-06 1:40 
AnswerRe: DataGrid, WinForm - how do I set column width to &quot;AutoFit&quot;? Pin
sathish s27-Mar-06 2:00
sathish s27-Mar-06 2:00 
QuestionSynchronized painting Pin
magja27-Mar-06 1:33
magja27-Mar-06 1:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.