Skip to content

Csharp Programming

Master Csharp Programming with 50 free flashcards. Study using spaced repetition and focus mode for effective learning in Programming.

🎓 50 cards ⏱️ ~25 min Advanced
Study Full Deck →
Share: 𝕏 Twitter LinkedIn WhatsApp

🎯 What You'll Learn

Preview Questions

12 shown

What is LINQ in C#?

Show ▼

LINQ (Language Integrated Query) is a set of features that allows you to write query expressions directly in C# to filter, sort, and transform data from collections, databases, and XML.
var results = list.Where(x => x > 5).OrderBy(x => x);

What is the difference between LINQ query syntax and method syntax?

Show ▼

Query syntax resembles SQL:
var q = from x in list where x > 5 select x;
Method syntax uses extension methods:
var q = list.Where(x => x > 5);
Both compile to the same IL code.

What does the LINQ Select method do?

Show ▼

Select projects each element of a sequence into a new form (a transformation/map operation).
var names = people.Select(p => p.Name);
It returns an IEnumerable<T> of the projected type.

What is deferred execution in LINQ?

Show ▼

Deferred execution means a LINQ query is not executed when defined, but only when the results are enumerated (e.g., via foreach, ToList(), or Count()). This allows efficient chaining of operations.

How do you use GroupBy in LINQ?

Show ▼

GroupBy groups elements by a key:
var groups = students.GroupBy(s => s.Grade);
Each group implements IGrouping<TKey, TElement> with a Key property and a collection of elements.

What is async/await in C#?

Show ▼

async/await is a language feature for writing asynchronous code that looks synchronous.
async Task<string> FetchAsync() {
  var data = await httpClient.GetStringAsync(url);
  return data;
}

It frees the calling thread while awaiting I/O operations.

What does the async keyword do in a method signature?

Show ▼

The async keyword marks a method as asynchronous, enabling the use of await inside it. It does not make the method run on a separate thread by itself; it allows the compiler to generate a state machine for asynchronous continuations.

What does await do in C#?

Show ▼

await asynchronously waits for a Task or Task<T> to complete.
It suspends the method's execution and returns control to the caller until the awaited task finishes, then resumes from where it left off.

What is the difference between Task and Task&lt;T&gt;?

Show ▼

Task represents an asynchronous operation that does not return a value (like void).Task<T> represents an asynchronous operation that returns a value of type T.Use Task for fire-and-forget style async methods and Task<T> when you need a result.

What is a delegate in C#?

Show ▼

A delegate is a type-safe function pointer that holds a reference to a method with a specific signature.
delegate int MathOp(int a, int b);
MathOp add = (a, b) => a + b;

Delegates are the foundation for events and callbacks.

What are Action and Func delegates?

Show ▼

Action – a delegate that returns void. E.g., Action<string> log = msg => Console.WriteLine(msg);Func – a delegate that returns a value. The last type parameter is the return type. E.g., Func<int, int, int> add = (a, b) => a + b;

What is a multicast delegate?

Show ▼

A multicast delegate holds references to multiple methods. When invoked, all methods in the invocation list are called in order.
Action greet = () => Console.Write("Hi ");
greet += () => Console.Write("there!");
greet(); // outputs: Hi there!

🎓 Start studying Csharp Programming

🎮 Study Modes Available

🔄

Flashcards

Flip to reveal

🧠

Focus Mode

Spaced repetition

Multiple Choice

Test your knowledge

⌨️

Type Answer

Active recall

📚

Learn Mode

Multi-round mastery

🎯

Match Game

Memory challenge

Related Topics in Programming

📖 Learning Resources