hi
I'm doing an exercise from a book, where I created a project called "Example.cs".
When I wrote the code, here are the steps involve:
1. Select New Item. This causes the Add New Item dialog to be displayed. Select Code File and then change the name to Example.cs,

2.Next, add the file to the project by pressing Add.

3. Next, type the example program into the Example.cs window and then save the file

4. Compile the program by selecting Build Solution from the Build menu.

5. Run the program by selecting Start Without Debugging from the Debug menu.

This is no problem until here. And below of the examples there is a note written like this:
As the preceding instructions show, compiling short sample programs using the IDE involves a number of steps. However, you don’t need to create a new project for each example program in this book. Instead, you can use the same C# project. Just delete the
current source file and add the new file. Then recompile and run.

What does the "Just delete the current source file and add the new file" mean here? How can I do that?
Does that mean, I have to delete the code that I've wrote and rename the Example.cs and do the next exercise?

Thank you
regards
tintincute

Recommended Answers

All 3 Replies

Or delete the Example.cs and repeat the steps to create new code file and paste the code into. Or simply replace existing code with new one.
Actually this is bad comment, ignore it!

hi Ramy
thanks for the comment. So what I did is, I commented the old examples and just rename the class and add another example.
Regards

OK, so mark it as solved!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.