Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using This in a method call
Message
From
12/11/2002 12:48:04
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Using This in a method call
Miscellaneous
Thread ID:
00721707
Message ID:
00721707
Views:
44
I have been learning C# thru Deitel's C# book. They have an example that they don't clearly explain the reason for the result.

In a contructor for a class they have:

writeline("Circle 5 constructor: {0}", this );


They explain that "this" implicitly calls the ToString() method of the class. How does the class know that ToString() is the method to call. There are 3 methods in the class. In looking at it, only one class returns a string. Could that be the reason?

Thanks,

Perry

(On an infant's shirt): Already smarter than Bush
Next
Reply
Map
View

Click here to load this message in the networking platform