Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Basics (Retired) Console I/O Recap

what is it .NET framework?

hi I have just started to learn c#, and I did not understand what is framework and method

thanks, Itai

1 Answer

Daniel Hartin
Daniel Hartin
18,106 Points

The .NET framework is basically a whole bunch of code written by microsoft which you can take advantage of in your own C# code. You use this by calling methods from classes they have already written and documented without actually having to know or even see what happens in their code.

System.Console.ReadLine(); is an example of one such method. I don't know what code they use inside the Console class or the ReadLine method and to be honest you and I don't need to, we simply only need know what it does, which is obviously return a string value from user input.

This is the power of reusing code and not reinventing the wheel when creating your own software. Wherever possible (at least when it's from a good source like microsoft) use code that's been written and tested before if it fits your needs it will help you concentrate on what is unique to your own software and become more efficient.

Hope this helps Daniel