User Tools

Site Tools


namespace_assembly_reference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
namespace_assembly_reference [2018/06/26 04:58] – created wolfgangriedmannnamespace_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( "c:\temp\HelloWorld.txt", "Hello World" )[/code]+<code>System.IO.File.WriteAllText( "c:\temp\HelloWorld.txt", "Hello World" )</code>
 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( "c:\temp\HelloWorld.txt", "Hello World" )[/code]+File.WriteAllText( "c:\temp\HelloWorld.txt", "Hello World" )</code>
  
 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:   System.IO +<code>Namespace:   System.IO 
-Assembly:  mscorlib (in mscorlib.dll)[/code]+Assembly:  mscorlib (in mscorlib.dll)</code
 + 
 +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