添加Lesson21

This commit is contained in:
2025-09-15 17:07:41 +08:00
parent 110ac84507
commit 4cf9bb6c97
4 changed files with 144 additions and 0 deletions
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Lesson21_面向对象相关_命名空间练习</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
@@ -0,0 +1,24 @@
namespace Lesson21_面向对象相关_命名空间练习
{
namespace UI
{
class Image
{
}
}
namespace Graph
{
class Image
{
}
}
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
UI.Image img1 = new UI.Image();
Graph.Image img2 = new Graph.Image();
}
}
}