Tuesday, October 30, 2007

DN4DP#28: .NET vs Win32: Class references

This post continues the series of The Delphi Language Chapter teasers from Jon Shemitz’ .NET 2.0 for Delphi Programmers book.

Last time we looked at differences in abstract class behavior. Here we look at class references.

Note that I do not get any royalties from the book and I highly recommend that you get your own copy – for instance at Amazon.

"Class references 

For the most part, the semantics of using class of references to create late-bound types of classes is unchanged in .NET. The only noticeable difference is that in .NET the constructor you call through the class reference must be declared virtual. In Win32 it doesn’t strictly have to be, but normally it should be declared virtual."

No comments:



Copyright © 2004-2007 by Hallvard Vassbotn