Selasa, 22 Maret 2011
Implementing the virtual method pattern in C#, Part Two
So far we've gotten rid of instance methods; they're just static methods that take a hidden "this" parameter. But virtual methods are a bit harder. We're going to implement virtual methods as fields of delegate type containing delegates to static methods. abstract class Animal{ public Func Complain; public Func MakeNoise; public static string MakeNoise(Animal _
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar