namespace_assembly_reference
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
namespace_assembly_reference [2018/06/26 04:58] – created wolfgangriedmann | namespace_assembly_reference [2018/06/26 05:00] – wolfgangriedmann | ||
---|---|---|---|
Line 15: | Line 15: | ||
All code in assemblies, included in your own executable, is organized in namespaces. | All code in assemblies, included in your own executable, is organized in namespaces. | ||
To be found, you need to either define the complete path included the namespace, like in | To be found, you need to either define the complete path included the namespace, like in | ||
- | [code]System.IO.File.WriteAllText( " | + | <code>System.IO.File.WriteAllText( " |
or to include the needed namespace at the top of your source code, and then use the class directly: | or to include the needed namespace at the top of your source code, and then use the class directly: | ||
- | [code]using System.IO | + | <code>using System.IO |
..... | ..... | ||
- | File.WriteAllText( " | + | File.WriteAllText( " |
If you use your own assemblies, you should look at the sources, but if it is either a .NET Framework assembly or a 3rd party assembly, please look at the documentation. | If you use your own assemblies, you should look at the sources, but if it is either a .NET Framework assembly or a 3rd party assembly, please look at the documentation. | ||
For the File class, the MSDN says: | For the File class, the MSDN says: | ||
- | [code]Namespace: | + | <code>Namespace: |
- | Assembly: | + | Assembly: |
+ | |||
+ | So to use the File class, you have to check two things: | ||
+ | * have the mscorlib.dll in your references | ||
+ | * either have a using System.IO at the begin of your source or use the full referenced class name | ||
namespace_assembly_reference.txt · Last modified: 2020/02/12 05:15 by wolfgangriedmann