Question running the program shown on textboook


New member
Sep 4, 2018
Programming Experience
Thank you for being interested in my post.

To begin with, I am new to C# and would like to learn it for unity.

I start learning C# with some basic knowledge in turbo pascal learned at school and some python.

I learn C# by reading textbook 'Sams teach yourself c# in 21 days'(written before 2005).
Yet I find difficulties when compiling the program the book shown on page 23 listing 1.3

The following is how the program looks like in the textbook:

And this is my program and the errors:

I use SharpDevelop as IDE for the program. Though the errors are shown in Chinese, I hope the information is enough for analysing the problem.

I swear my program has no difference to that on the textbook.

Are there any ways the solve the problem? Is it not a good idea to use SharpDevelop as IDE? (I can't use Visual Studio 2017 as I can't upgrade my OS to the required version)
I swear my program has no difference to that on the textbook.

Oh you do, do you? What class is your MyForm class inheriting? What class does the one in the example inherit?

What type of project did you create in the first place? If you want to create an application using Windows Forms then you should have created a Windows Forms Application project. I suspect that you may not have.
Top Bottom