please help me figure it out | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

please help me figure it out

using System; using System.Windows.Forms; - Are the two namespaces different? Their names are similar. - The differences are small. In any case, we use the following directive: Using System; She tells C # to use objects System. For simplicity, you can think of a namespace as a directory on your hard drive. The directive that defines the use of the System.Windows.Forms namespace instructs to look for objects also in a subdirectory of the system catalog. This means that C # will not automatically search the Windows.Forms directory even if a reference to the System namespace is included in the program.

13th Jun 2021, 9:56 PM
‎أندريه‎
‎أندريه‎ - avatar
3 Answers
+ 1
They are different and yes, you can think of them as directories on a hard drive. If you wanted to create a timer, for instance, you would use system.windows.forms.timer mytimer = new ect... If you have the using statement "using system;" then you can knock just the "system" part off of the declaration. But, if you have "using system.Windows.forms;" you can just declare "Timer mytimer = new Timer();".
14th Jun 2021, 6:36 PM
Kail Galestorm
Kail Galestorm - avatar
+ 1
Conceptually yes but, they may not actually be packaged that way. The compiler will act as though they are. Name spaces are not file structures and can be independent of the file structure of precompiled code, but they are comparable to file structure.
18th Jun 2021, 6:02 PM
Kail Galestorm
Kail Galestorm - avatar
0
Is it safe to assume that using system is a folder and using System.Windows.Forms is a folder in the using System folder?
17th Jun 2021, 3:54 PM
‎أندريه‎
‎أندريه‎ - avatar