- Implement an extension method
Substring(int index, int length)
for the classStringBuilder
that returnsnew StringBuilder
and has the same functionality asSubstring
in the classString
. - Implement a set of extension methods for
IEnumerable<T>
that implement the following group functions: sum, product, min, max, average. - Write a method that from a given array of students finds all students whose first name is before its last name alphabetically. Use LINQ query operators.
- Write a LINQ query that finds the first name and last name of all students with age between 18 and 24.
- Using the extension methods
OrderBy()
andThenBy()
with lambda expressions sort the students by first name and last name in descending order. Rewrite the same with LINQ. - Write a program that prints from given array of integers all numbers that are divisible by 7 and 3. Use the built-in extension methods and lambda expressions. Rewrite the same with LINQ.
- Using delegates write a class
Timer
that has can execute certain method at eacht
seconds. - * Read in MSDN about the keyword
event
in C# and how to publish events. Re-implement the above using .NET events and following the best practices.