Jump to content

In C# (c hash tag), I saw that you were placing a class within a class What does that cause in c...


G+_James Coleman
 Share

Recommended Posts

In C# (c hash tag), I saw that you were placing a class within a class. What does that cause in case of scope?

 

I will use what was used in the episode as an example. The class Program had the class Car. Can only the class Program and classes under it see the class Car, or can classes out side of the class Program see Car as well?

Link to comment
Share on other sites

I placed my classes all over to check differences so it was outside the program class as well as inside and in these attempts it made no difference. In real practice though your class would be saved in a separate file to save space.

Link to comment
Share on other sites

 Share

×
×
  • Create New...