초기 커밋.

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>
+56
View File
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExF.Class
{
public class MyCustomer
{
// 필드
private string name;
private int age;
// 이벤트
public event EventHandler NameChanged;
// 생성자 (Constructor)
public MyCustomer()
{
name = string.Empty;
age = -1;
}
// 속성
public string Name
{
get { return this.name; }
set
{
if (this.name != value)
{
this.name = value;
if (NameChanged != null)
{
NameChanged(this, EventArgs.Empty);
}
}
}
}
public int Age
{
get { return this.age; }
set { this.age = value; }
}
// 메서드
public string GetCustomerData()
{
string data = string.Format("Name: {0} (Age: {1})",
this.Name, this.Age);
return data;
}
}
}
+13
View File
@@ -0,0 +1,13 @@
using ExF.Class;
internal class Program
{
private static void Main(string[] args)
{
MyCustomer customer1 = new MyCustomer();
MyCustomer customer2 = new();
var customer3 = new MyCustomer();
}
}