mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-07 23:33:50 +00:00
Initial commit
This commit is contained in:
parent
bc96ccb183
commit
18f89e91d4
62 changed files with 1661 additions and 2 deletions
6
vscode/Chapter05/Namespaces/France.Paris.cs
Normal file
6
vscode/Chapter05/Namespaces/France.Paris.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace France
|
||||
{
|
||||
public class Paris
|
||||
{
|
||||
}
|
||||
}
|
||||
14
vscode/Chapter05/Namespaces/Namespaces.csproj
Normal file
14
vscode/Chapter05/Namespaces/Namespaces.csproj
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Using Include="System.Console" Static="true" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
10
vscode/Chapter05/Namespaces/Program.cs
Normal file
10
vscode/Chapter05/Namespaces/Program.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using France;
|
||||
using us = Texas; // us becomes alias for the namespace and it is not imported
|
||||
using Env = System.Environment;
|
||||
|
||||
Paris p1 = new();
|
||||
us.Paris p2 = new();
|
||||
|
||||
WriteLine(Env.OSVersion);
|
||||
WriteLine(Env.MachineName);
|
||||
WriteLine(Env.CurrentDirectory);
|
||||
6
vscode/Chapter05/Namespaces/Texas.Paris.cs
Normal file
6
vscode/Chapter05/Namespaces/Texas.Paris.cs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
namespace Texas
|
||||
{
|
||||
public class Paris
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue