Invoke Static Method

I am trying to test a static method. The method takes a DateTime parameter. How do I enter a DateTime value in the Invoke Method dialog box for this parameter? I have tried:

#1/1/2005#
new DateTime(2005,1,1)
and others

with no luck. It keep getting a type mismatch message.

[285 byte] By [DanJurden] at [2008-1-25]
# 1

Here's how I was able to do this:
1. In Class View, create an instance of DateTime (under Project References->mscorlib->System->DateTime).
2. Now invoke the static method. You should be able to choose the DateTime you created in the dropdown.

This functionality is actually independent of the Team System features, so I'm not entirely familiar with it. However, I'm following up with the group responsible for it, so I'll post again once I find out if there's a better or quicker way to do this.

KevinCogger at 2007-8-21 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 2
Great! This does work...but there HAS to be an easier way...

I'll check back to see if you are successfull in finding one.

DanJurden at 2007-8-21 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 3
It looks like the other way to do this is to use the Immediate window. You can type something like System.DateTime date = new System.DateTime(2005, 1, 1); which will put the DateTime object in the Object Test Bench. You can then use it in the Invoke Static Method dialog in the same way as before. However, this isn't supported for Visual Basic.
KevinCogger at 2007-8-21 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...

Visual Studio Team System

Site Classified