Thread: what is asp.net
View Single Post
  #7 (permalink)  
Old May 3rd, 2007, 04:16 AM
Larryz Larryz is offline
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Larryz
Default

Its seems that when you create a new object of your own design
certain methods seems to be defined automatically for it....

ToString() for example...

This is confusing, for me at least..

You can do things like myObject.ToString();

What is this doing...

why do you want to do that

i mean if you have an object, which is an instance of a class
this is odd..

why say for example myObject.Name, here you force the object to
return the Name field using the get { return name }, for example.

or you can call other defined publicly available methods. which you define and implement...

So why then allow myObject.ToString() although not implemented in object... it doesnt make sense to me... myObject.ToString() its like trying to convert the entire thing to a string.. and for what purpose..

Also the books says abstract classes cant be instantiated but
what does that mean.... I thought it meant you cant create an instance of it...but only derive from it... but you are partly creating and instance of it when you store fields values in it.... via a derived object.

Larry confused again , no change there then.. :)

Reply With Quote