Use NUnit or MSTest to write a super simple test harness that calls the static methods. Or write a single test method that uses a string variable to in turn call a specified static method.
(If there's a better way to do this in Visual Studio, I'm all ears. I seem to recall there's some mechanism ... maybe an add-in? that is supposed to give the immediate window that ability, but I don't recall ever seeing it work _well_.) ∞ Andy Badera ∞ +1 518-641-1280 ∞ This email is: [ ] bloggable [x] ask first [ ] private ∞ Google me: http://www.google.com/search?q=andrew%20badera On Tue, Oct 6, 2009 at 6:02 PM, alex <[email protected]> wrote: > > > I am coming from eclipse world and java. > In java you have collection of classes and eclipse (IDE) allows you to > call > static main() methods of each class seperately (kind of quick test) > > now i am working in c sharp and visual studio i figured out that it is > not really possible to do it -- each > project has one entry point so it is hard to have this flexibility > > effectively is i have > > class A { public static void Main() { a = new A(); a.runcode(); }} > class B { public static void Main() { b = new B(); b.runcode(); }} > .... > class Z { public static void Main() { z = new Z(); z.runcode(); }} > > > I would like to run either an instance of A or instance of B or > instance of > something else from IDE for quick testing > > > how can i retain the ability to run each class in the project > on its own -- it is great and convenient for quick test of whether > a class is working and to do bottom line design of the programs > > many thanks > > alex >
