Thread: what is asp.net
View Single Post
  #10 (permalink)  
Old May 3rd, 2007, 11:00 AM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I am sorry, no. I misunderstood you. In my example I was referencing the static properties of my foo object in the above code.

When You create an instance of an object and then call the .ToString() method, what this does is it gives you a human readable string of what the object is.

For example doing:
Object o = new Object();
Console.WriteLine(o.ToString());

Will print out System.Object.

On the flip side:
int i = 0;
Console.WriteLine(i.ToString());

will return 0.

In your example above, calling .ToString should return: mynamespace.myClass

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote