Learn to Code: Logical thinking and C# by Shreeharsh Ambli

Learn to Code: Logical thinking and C# by Shreeharsh Ambli

Author:Shreeharsh Ambli [Ambli, Shreeharsh]
Language: eng
Format: epub
Published: 2018-11-13T23:00:00+00:00


But we still have a problem, running the code results in:

Figure 13: the Car class is not accessible, notice the red underlines

VS tries to help us in such cases, simply click on the Car word & hit CTRL + ‘.’ Which brings up potential fixes:

Choose the first option to add the using statement and the error goes away. But we still have another issue:

But this time the potential fixes doesn’t show the fix that we need. Instead we need to make the Start method more accessible. By default, anything in a class is private i.e. not accessible outside of the class.

Let’s make the Start method public so that we can access it from Main:

using CarApp;

using System;



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.