-1

I know this may be a silly question, but I have looked in a lot of books and tutorials and they explain what is a class, and what's a solution but there's no way to confirm if what I'm understanding is right or wrong besides asking to a human that have some knowledge about the topic.

From what I understand a Solution is a group or classes, and there's a main class that contains the most important parts of the code and how objects are supposed to interact, and from time to time it calls some other classes which have the information about and specific object.

I.E. I have a solution of a game where a bird flies avoiding clouds(?), so I have a class with all the info related to the bird, another one related to the Cloud and a Main class who have all the information regarding how the cloud.cs and the bird.cs are supposed to interact.

I know this may be a really dumb question, but as I told you before, there's no way a book or a website can say to me "yes, you understood correctly".

Thanks in Advance!

miguelopezv
  • 790
  • 2
  • 8
  • 28
  • 5
    Solution is a collection of projects, Projects are a collection of code files which compile into a single `.exe` or `.dll` file, called an assembly. the "main" class simply tells the windows runtime which function it should execute first when the `.exe` is run, and a main class isn't relevant in a `.dll` (aka class library). – Claies Apr 01 '15 at 21:28
  • The question is still too broad to be answered properly in this format, but hopefully my comment can give you an idea of the broader concepts so you can ask a more focused question next time. – Claies Apr 01 '15 at 21:32
  • 1
    Does the bird happen to flap it's wings when you touch the screen? If so [that's been done before](http://en.wikipedia.org/wiki/Flappy_Bird)... – D Stanley Apr 01 '15 at 21:32

1 Answers1

1

I googled around a bit and found a perfectly viable explanation about what a solution and a project is. The explanation of Claies is short, to the point and correct.

A more elaborate explanation can be found here from MS themselves. https://msdn.microsoft.com/en-us/library/b142f8e7.aspx

A solution is a collection of projects that are bound together somehow to build a complex application. A complex application can consist of several projects and each project defines an assembly.

To give a concrete example: you create a client and a server application. The client and the server communicate with each other and logically they belong together. One without the other makes no sense. So you can create a solution that contains the client and the server project. To make it more complex, it might be possible that these 2 projects share some code. You can then decide to split of the common code is some kind of library project. So you would have 3 projects in your solution.

Philip Stuyck
  • 7,344
  • 3
  • 28
  • 39