You should be careful with the approach of looking at other's code in order to learn programming. Keep in mind that such code is not taylored to education, and often contains compromises, hacks, or ancient techniques. When there are economic goals, it sometimes doesn't pay off to keep code clean (at least that's the short-sighted view, often it will cause more work and frustration in the long term). For C++ it's extreme, you'll find a lot of code that does more harm than good if you adopt it
For C# it's a bit less problematic, because the language is more restrictive and more modern from the beginning.
If you're interested in how to develop a game from the very beginning, you might want to have a look at our book
SFML Game Development. If you're only interested in the code and not the explanations and design decisions behind it, it is freely available on
GitHub. Although it's C++ and contains some language-specific features, a lot of the concepts (such as the scene graph) can be applied to other programming languages. I'm sure there are also similar books for C# programming, most of them probably related to XNA. There are also books focusing on game development in general, with the programming language used only to demonstrate some concepts, rather than to build a complete game.