You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
745 B

using System;
using System.Collections.Generic;
namespace Apewer.Internals.QrCode
{
internal delegate TResult Func<in T, out TResult>(T arg);
internal static class Methods
{
public static bool Contains<T>(IEnumerable<T> objects, T cell)
{
foreach (var i in objects)
{
if ((object)i == (object)cell) return true;
}
return false;
}
public static List<int> Select(IEnumerable<string> input, Func<string, int> selector)
{
var list = new List<int>();
foreach (var oldValue in input)
{
list.Add(selector(oldValue));
}
return list;
}
}
}