초기 커밋.

This commit is contained in:
2025-03-05 10:21:10 +09:00
parent 3471914e64
commit 15885a2286
55 changed files with 1716 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
+45
View File
@@ -0,0 +1,45 @@
internal class Program
{
// 구조체 정의
struct MyPoint
{
public int X;
public int Y;
public MyPoint(int x, int y)
{
this.X = x;
this.Y = y;
}
public override string ToString()
{
return string.Format("({0}, {1})", X, Y);
}
}
sealed class MyPointC
{
public int X;
public int Y;
public MyPointC(int x, int y)
{
this.X = x;
this.Y = y;
}
public override string ToString()
{
return string.Format("({0}, {1})", X, Y);
}
}
private static void Main(string[] args)
{
// 구조체 사용
MyPoint pt = new MyPoint(10, 12);
Console.WriteLine(pt.ToString());
}
}