Looking for Основи розробки програмного забезпечення на платформі Microsoft.NET test answers and solutions? Browse our comprehensive collection of verified answers for Основи розробки програмного забезпечення на платформі Microsoft.NET at do.ipo.kpi.ua.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
public static Func
Cloner()
{
var p = Expression.Parameter(typeof(T));
var n = Expression.MemberInit(Expression.New(typeof(T)),
typeof(T).GetProperties().Select(pi =>
Expression.Bind(pi, Expression.Property(p, pi))));
return Expression.Lambda
>(n, p).Compile();
}
Що головне у цьому підході?
var cnt = new[]{ "dot","dog","dig" }
.GroupBy(w=>w[1])
.Select(g=>g.Count())
.Max();
]]>public override bool Handle(Request r)
{
if (ShouldSkip(r)) return false; // Next не викликається
return base.Handle(r);
}
Що може статись із ланцюгом?
try
{
JsonSerializer.Deserialize<Point>("""{"x":1,"y":"oops"}""");
}
catch (JsonException ex)
{
System.Console.WriteLine(ex.Path);
}
record Point(int x, int y);
var res = new[] { "x", "y", "z" }.Reverse().Skip(1).First();]]>exporter.Save("out.dat"); sorter.DoSort(list);
Ключова різниця Template Method vs Strategy?
Реалізацію завдання патерном декоратор (Decorator) можна замінити реалізацією через успадкування ?
var words = new[] { "dot", "dog", "dig" };
var grouped = words.GroupBy(w => w[1]).Select(g => g.Count()).Max();
]]>int[] p = {1,2,3};
int[] q = {3,4};
var diff = p.Union(q).Except(p.Intersect(q));
]]>Класів, які реалізують інтерфейс IStrategy в патерні Стратегії, надаючи свою версію методу Algorithm(), може бути