20 Feb 2019

c#basics interfaces IComparable IComparer sort casting

toop

We learned about array sorting using IComparable and IComparer. we implemented the Generics form of the interfaces IComparable IComparer. we also performed casting using (type)obj.

compvscomp

More topics covered:

    • default value of an object inside a class is null
    • as + null check is better than is + casting
    • IComparer class could be in the same class file
    • reverse sort order

Links:

Leave a comment

Design a site like this with WordPress.com
Get started