Click here to Skip to main content
15,899,124 members
Home / Discussions / C#
   

C#

 
Question2 server Pin
aarontan4-Oct-05 18:27
aarontan4-Oct-05 18:27 
AnswerRe: 2 server Pin
ehuysamer4-Oct-05 22:36
ehuysamer4-Oct-05 22:36 
GeneralRe: 2 server Pin
Anonymous4-Oct-05 23:39
Anonymous4-Oct-05 23:39 
GeneralRe: 2 server Pin
ehuysamer5-Oct-05 9:24
ehuysamer5-Oct-05 9:24 
GeneralRe: 2 server Pin
aarontan5-Oct-05 17:26
aarontan5-Oct-05 17:26 
Questionsystem tray Pin
shashank veerkar4-Oct-05 18:21
shashank veerkar4-Oct-05 18:21 
AnswerRe: system tray Pin
Member 23314964-Oct-05 22:12
Member 23314964-Oct-05 22:12 
AnswerRe: system tray Pin
enjoycrack5-Oct-05 14:41
enjoycrack5-Oct-05 14:41 
QuestionDraw Pin
Tran Ngoc Minh4-Oct-05 17:52
Tran Ngoc Minh4-Oct-05 17:52 
AnswerRe: Draw Pin
enjoycrack5-Oct-05 14:35
enjoycrack5-Oct-05 14:35 
QuestionUsing OLE Object Pin
Sarat Gollapudi4-Oct-05 17:44
Sarat Gollapudi4-Oct-05 17:44 
QuestionOpen Excel Project Pin
azusakt4-Oct-05 17:14
azusakt4-Oct-05 17:14 
AnswerRe: Open Excel Project Pin
sean_mufc5-Oct-05 7:22
sean_mufc5-Oct-05 7:22 
QuestionFile Copy Agent Printer Pin
Member 24613494-Oct-05 16:33
Member 24613494-Oct-05 16:33 
AnswerRe: File Copy Agent Printer Pin
Matthew134569844-Oct-05 17:30
sussMatthew134569844-Oct-05 17:30 
QuestionButton with a drop-down arrow Pin
David Wengier4-Oct-05 14:30
David Wengier4-Oct-05 14:30 
AnswerRe: Button with a drop-down arrow Pin
ehuysamer4-Oct-05 22:46
ehuysamer4-Oct-05 22:46 
AnswerRe: Button with a drop-down arrow Pin
Andy Moore5-Oct-05 6:48
Andy Moore5-Oct-05 6:48 
QuestionGenerate subsets from a string Pin
JoaoPe4-Oct-05 12:44
JoaoPe4-Oct-05 12:44 
AnswerRe: Generate subsets from a string Pin
Robert Rohde4-Oct-05 19:37
Robert Rohde4-Oct-05 19:37 
This method should do the job:
private void SearchCombinations(string[] splitted, int currentIndex, string resultSoFar, ArrayList results) 
{
   if (currentIndex >= splitted.Length)
      return;

   string nextResult = resultSoFar + splitted[currentIndex];
   results.Add(nextResult);
   SearchCombinations(splitted, currentIndex + 1, nextResult, results);
   SearchCombinations(splitted, currentIndex + 1, resultSoFar, results);
}


where the initial call should be something like:
ArrayList results = new ArrayList();
SearchCombinations("A B C D".Split(' '), 0, "", results);


and to make output at the end:
string output = "Combination Count:" + results.Count;
foreach (string s in results) 
   output  += "\n" + s;


Note that this is very memory hungry because all results are stored in memory, but for 26 characters (I tried it with the whole alphabet) it should work (although taking some time because of paging).
Questionhow handle objects and code of setup forms? Pin
Sasuko4-Oct-05 12:43
Sasuko4-Oct-05 12:43 
Questionhow to display script message? Pin
kani984-Oct-05 11:26
kani984-Oct-05 11:26 
AnswerRe: how to display script message? Pin
enjoycrack5-Oct-05 14:43
enjoycrack5-Oct-05 14:43 
GeneralRe: how to display script message? Pin
kani986-Oct-05 7:49
kani986-Oct-05 7:49 
GeneralRe: how to display script message? Pin
enjoycrack6-Oct-05 10:48
enjoycrack6-Oct-05 10:48 

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.