On Tue, Oct 6, 2009 at 6:02 PM, alex <[email protected]> wrote:
> 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
>
>
Well, it really helps to know WHICH version of C# and VS you're running, as
capabilities change all over the place.
My 'about' box starts off:
Microsoft Visual Studio 2008 Version 9.0.30729.1 SP
Microsoft .NET Framework Version 3.5 SP1 Installed Edition: Enterprise
and then goes on and on for about 80 lines, so, I dunno.
But, I'd think that the 'easy' way is just to temporarily change the entry
point of the project to the class you want to test. Run the project, test
that class, done. :)
Am I missing something here? Y'all are being nice and complex with the test
rig or nunit or that horrible object workbench I've seen from time to time
and never bothered with, but this seems to approximate what the OP does in
Eclipse. :)
-- Peter Smith