Logo




Subscribe:
RSS 2.0 | Atom 1.0
Categories:

Sign In


[Giagnocavo]Michael::Write()

 Monday, June 14, 2004
The Object Test Bench
Just another way Visual Studio 2005 “Whidbey” is going to help out: The Object Test Bench. This nifty tool (found in View -> Other Windows -> Object Test Bench) allows you to create objects and play around with them at design time. For instance, suppose I want to find out what kind of data the System.IO.FileInfo class presents, and how it presents it (say, do directories have a trailing slash?). I simply open the window, and type in my expression:
System.IO.FileInfo someFile = new System.IO.FileInfo(”C:\\x.cs”);

Presto! I can now explore this new object. Supposedly, there will be other ways to get objects into the bench, say the Class View or Designer, but it didn't seem to work in the build I'm using (which is a bit more current than the May CTP). Trying to create some of my own classes or collection classes seemed to have problems too, but I'm getting a new build in a few days, so we'll see if it's fixed then.
Now, suppose we want to learn more about the functionality of this object. Right click it, and away we go:

I created a new object, a string, to store the filename, and now I'll invoke the CopyTo(string, bool) method. I can use new literals, or existing objects:

Any (?I think?) expression is valid, so I could do: filename = Path.GetTempFileName(); and use the result in a variable. Even better, I don't even need to declare the variable. Any method called pops up a dialog stating what was returned, and prompts to add it to the bench. Here, I've called “ToUpperInvariant()“ on an existing string:


Just another gem that's definately going to help as I explore .NET 2.0.
Code | Misc. Technology
Monday, June 14, 2004 5:05:56 AM UTC  #    Comments [3]  |  Trackback Tracked by:
"http://sj1uiza.biz/cellular-zeolite.html" (http://sj1uiza.biz/cellular-zeolite.... [Pingback]


Saturday, January 08, 2005 9:26:52 PM UTC
You ever seen BlueJ www.bluej.org. It looks just like this.
I like it, BlueJ was my introduction to Java at university.
Another reason to look forward to Whidbey
Wednesday, February 09, 2005 10:08:10 AM UTC
More information at http://blogs.msdn.com/parthopdas/archive/2005/02/09/369659.aspx
Partho
Sunday, May 22, 2005 5:19:45 PM UTC
Definitely like blueJ.
Have a look at http://www.bluej.org/vs/vs-bj.html and you'll see for youselff!
JP Pablo
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview