Good day,
I have a little issue with converting a function from C# to VB.NET. Here's the code:
public static IEnumerable<string> Lexicograph(List<string> characters, int length)
{
for (int i = 0; i < characters.Count; i++)
{
if (length == 1)
yield return characters[i];
else
foreach (string nxt in Lexicograph(characters.GetRange(i + 1, characters.Count - (i + 1)), length - 1))
yield return characters[i] + " " + nxt;
}
}
I know there are some online convertors, but those aren't doing their job correctly since the compiler says there are errors/warnings in my code (conversion from String to IEnumerable).
I'm not that familiar with the lists and the IEnumerable interface and that's why I came here.
If there's anyone who can find a solution for this or any other kind of tip, it'll be greatly appreciated.
Thanks in advance.