Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running code samples from Internet
Message
From
12/12/2007 15:00:03
Irv Adams
MSC Managed Care, Inc.
Florida, United States
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01271279
Message ID:
01275289
Views:
8
>>>>To All:
>>>>
>>>>I often see complete, self-contained code samples on the Internet for C# .NET programs. What type of Project/File do I have to create within VS to be able to copy/paste/compile/run these code samples?
>>>>
>>>>It seems the projects and files I can create are too specific for my needs. I just want something like a generic code container, such as the PRG file in FoxPro.
>>>>
>>>>Thanks for your help,
>>>
>>>If they're just .cs files that can be run by themselves, then don't use VS to play with them. Get a text editor and do the compiles by command line. I also find that projects are overkill for some testing. In those sorts of situations, I use UltraEdit and I compile and run .cs files using macros. Works very nicely.
>>
>>Alan,
>>
>>I tried copying/pasting code examples into VS C# class files so I could see the syntax coloring and use intellisense. The examples run fine, and I can add code and re-compile, etc., but I'm having some problem getting intelliense to work.
>>
>
>Take a look at Snippet Compiler: http://www.sliver.com/dotnet/SnippetCompiler/ - it's a nice lightweight app. that gives you a simple way of testing out code segments w/o Visual Studio. It creates a simple command-line style class for you with a few helper methods to read/write stuff out to the console.

Cool, it looks interesting; I'll check it out, thanks!
Previous
Reply
Map
View

Click here to load this message in the networking platform