14
Answers

C# Function that generates strings according to input

Sa Za

Sa Za

14y
4.9k
1

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)