Sa Za

Sa Za

  • NA
  • 13
  • 0

C# Function that generates strings according to input

Mar 8 2010 2:24 PM

Hi,

 

I need a C# function that takes 2 strings as an input and return an array of strings.

private string[] FunctionName (string string1, string string2)

{

//code

}

 

The strings input will be in the following format:

String1 eg -> basement

String2 eg -> **a*f**a

Now what I need is all combination of possible strings using the characters in String2, and keeping them in the same character position.

Eg: baaement, baaefent, baaefena, basefent, basemena, etc


any help? :)


Answers (14)