Skip to content
AtomicReps

Navigation

11/30Computer Science

C# Programming.

The C# language: its type system, its members, its patterns and the rules the compiler enforces.

  • C# Programming · 1 of 3

    Pattern matching

    In C# pattern matching, what do the and and or combinators allow?

  • C# Programming · 2 of 3

    Extension methods

    In C#, which output line of this program shows the iterator body had not run when Doubled() was called?

    typescript
    using System;using System.Collections.Generic;using System.Linq;static class Help{    public static IEnumerable<int> Doubled(this IEnumerable<int> xs)    {        Console.WriteLine("walking");        foreach (int x in xs) yield return x * 2;    }}class P{    static void Main()    {        var q = new[] { 1, 2, 3 }.Doubled();        Console.WriteLine("built");        Console.WriteLine(string.Join(",", q));        Console.WriteLine(q.Count());    }}
  • C# Programming · 3 of 3

    Lambdas

    In C#, what does a closure created by a lambda that uses outer locals hold?

Three of the 1,758 C# Programming questions.

Keep going with C# Programming, free
Next topic · 12/30C# Tooling & Runtime.