From 37b2d9105c93e2752c2f782467dff8da2e8d5920 Mon Sep 17 00:00:00 2001 From: Yusuf Praditya <47532266+yusufpraditya@users.noreply.github.com> Date: Fri, 8 Sep 2023 21:20:46 +0700 Subject: [PATCH] Separate classes --- W1 D4/TypeManipulation/Number.cs | 10 ++++++++++ W1 D4/TypeManipulation/Program.cs | 12 ++---------- W1 D4/TypeManipulation/TypeManipulation.csproj | 4 +--- 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 W1 D4/TypeManipulation/Number.cs diff --git a/W1 D4/TypeManipulation/Number.cs b/W1 D4/TypeManipulation/Number.cs new file mode 100644 index 0000000..7e98639 --- /dev/null +++ b/W1 D4/TypeManipulation/Number.cs @@ -0,0 +1,10 @@ +namespace TypeManipulation; + +public class Number +{ + public int number; + public Number(int x) + { + number = x; + } +} diff --git a/W1 D4/TypeManipulation/Program.cs b/W1 D4/TypeManipulation/Program.cs index f20a2c0..ed14544 100644 --- a/W1 D4/TypeManipulation/Program.cs +++ b/W1 D4/TypeManipulation/Program.cs @@ -1,4 +1,5 @@ -public class Program +using TypeManipulation; +public class Program { static void Main() { @@ -26,13 +27,4 @@ static void Main() Console.WriteLine(text1); Console.WriteLine(text2); } -} - -public class Number -{ - public int number; - public Number(int x) - { - number = x; - } } \ No newline at end of file diff --git a/W1 D4/TypeManipulation/TypeManipulation.csproj b/W1 D4/TypeManipulation/TypeManipulation.csproj index f02677b..b8e5116 100644 --- a/W1 D4/TypeManipulation/TypeManipulation.csproj +++ b/W1 D4/TypeManipulation/TypeManipulation.csproj @@ -1,10 +1,8 @@ - Exe net7.0 enable enable - - + \ No newline at end of file