namespaces: using System & using System.IO
c#, namespaces
Solution
`System.IO` namespace is used for `Input Output` operations.(Ex: `File` Operations)
`System` namespace does not include all child namespaces. So if you want to perform `IO` Operations you should include `System.IO` namespace `explicitly`.
First Question : Is the second statement actually necessary to include Sytem.IO methods and properties in my code?
Yes it is Necessary as `System` namespace does not include `Child` namespaces.
Second Question : It seems that 'System.IO' is a 'child' of the namespace 'System'.
Yes `System.IO` is a Child of `System` namespace.
Note : though `System.IO` is a child namspace of `System`, it will not be included when you include `System` namspace
Third Question : Shouldn't the first line grab all the child namespaces too? Or Do I not understand namespaces correctly?
No first line `using System;` does not grab all the Child namespaces as it is not `java` to `import` all `child` namspeaces using wild card character star `*`
Problem
so my program has these 2 lines at the beginning ``` using System; using System.IO; ``` Question: Is the second statement actually necessary to include Sytem.IO methods and properties in my code? It seems that 'System.IO' is a 'child' of the namespace 'System'. Shouldn't the first line grab all the child namespaces too? Or Do I not understand namespaces correctly?