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
Paid Courses
Learn WPF
Datagrid Tutorials
Free Courses
LINQ Tutorials
.NET Threading Tutorials
Learn WPF
Datagrid Tutorials
Free Courses
LINQ Tutorials
.NET Threading Tutorials