someone can describe the concepts: "namespace" console.readline, in a simple way, because I am a beginner | SoloLearn: Learn to code for FREE!

+1

someone can describe the concepts: "namespace" console.readline, in a simple way, because I am a beginner

c#

3/6/2018 2:54:19 AM

Flash #3

1 Answer

New Answer

0

I think namespace mean collection of your codes (user defined or built-in code). Just think it contains some attributes. What is attributes? Attributes may be classes, or functions, or some variables, or some other types rather than class (struct, enum, delegate) and so on. You don't need to remember whether namespace contains what. But you should remember it contains some attributes. So, lets get to your example. Console.ReadLine() Console is contained within System namespace. So, let expand it: System.Console.ReadLine() 'System' namespace contain some attributes which is Console (class). Attributes may be anything, right? And Console class contain static method 'ReadLine'. That's it! When u call it, it will show you user input form. It's simple now, right? Hope this help you to understand. :) Happy coding!