Переделать код с C# на VB

Удивительно
На сайте с 07.07.2009
Offline
215
508

Сабж, не могу осилить че-то


static IEnumerable<String> f(IEnumerable<IEnumerable<String>> arg)
{
List<string> emp = new List<string>();
emp.Add("");

return arg.Aggregate(emp as IEnumerable<string>,
(total, next) => total.SelectMany( (x) => next.Select( (y) => x + y)));
}



---------- Добавлено 13.02.2012 в 21:23 ----------

Разобрался, не актуально

Вдруг кому надо:


Function Permutate(ByVal arg As IEnumerable(Of String)) As IEnumerable(Of String)

Dim emp As New List(Of String)
emp.Add(String.Empty)

Return arg.Aggregate(emp.AsEnumerable, Function(total, nxt) total.SelectMany(Function(x) nxt.Select(Function(y) x + y)))

End Function
Качественная семантика недорого ( https://moab.tools/ )

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий