As I read through .NET Book Zero and cross reference the MSDN .Net FCL documentation I find myself smiling often and occasionally chuckling. I had not expected this. Yes, Petzold has an amusing style but really it's more the delight of discovery that brings all this forth.
It is clear to me that the architects of C# and the FCL have OO in their blood. Not only that, the functionality found in the FCL is a testament to collective knowledge and experience in developing software solutions.
int is a instance of the System.Int32 struct, for example, and is rich in the functionality of it's members. Likewise, string, and instance of System.String. C# has put logic and functionality under the hood of what verteran C programmers might consider data value types.
Again... everything is an object. Even any classes or structs that I might define are all derived from System.Object. The C# language uses the word object as an alias for System.Object. So this method: System.Object.ToString is the same as object.ToString is the same as myObject.ToString (overloaded notwithstanding).
It makes me smile. 8-)
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment