75
var paidCourses = courses.OfType<PaidCourse>();
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
5
namespace ConsoleApplication1
6
{
7
abstract class Course
8
{
9
public int ID { get; set; }
10
public string Subject { get; set; }
11
public int Rank { get; set; }
12
}
13
14
internal class FreeCourse : Course
15
{
16
17
}
18
19
internal class PaidCourse : Course
20
{
21
public decimal Fees { get; set; }
22
}
23
24
public class Program
Cached Result
Compilation error (line 2, col 14): The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)
Compilation error (line 7, col 45): 'string' does not contain a definition for 'Reverse' and no accessible extension method 'Reverse' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)
Compilation error (line 7, col 45): 'string' does not contain a definition for 'Reverse' and no accessible extension method 'Reverse' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)