diff --git a/ClassMetotDemo.sln b/ClassMetotDemo.sln new file mode 100644 index 0000000..1013958 --- /dev/null +++ b/ClassMetotDemo.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30804.86 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassMetotDemo", "ClassMetotDemo\ClassMetotDemo.csproj", "{8EF3A8A9-C936-4216-A1A4-2C1593FD2506}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8EF3A8A9-C936-4216-A1A4-2C1593FD2506}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8EF3A8A9-C936-4216-A1A4-2C1593FD2506}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8EF3A8A9-C936-4216-A1A4-2C1593FD2506}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8EF3A8A9-C936-4216-A1A4-2C1593FD2506}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AE78AE78-08DD-4DA7-AE22-D730A107E3BE} + EndGlobalSection +EndGlobal diff --git a/ClassMetotDemo/ClassMetotDemo.csproj b/ClassMetotDemo/ClassMetotDemo.csproj new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ b/ClassMetotDemo/ClassMetotDemo.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/ClassMetotDemo/Musteri.cs b/ClassMetotDemo/Musteri.cs new file mode 100644 index 0000000..44131ea --- /dev/null +++ b/ClassMetotDemo/Musteri.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ClassMetotDemo +{ + class Musteri + { + public int Id { get; set; } + public string AdSoyad { get; set; } + public ulong TelefonNo { get; set; } + public string Adres { get; set; } + } + +} diff --git a/ClassMetotDemo/MusteriManager.cs b/ClassMetotDemo/MusteriManager.cs new file mode 100644 index 0000000..bb3f66a --- /dev/null +++ b/ClassMetotDemo/MusteriManager.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ClassMetotDemo +{ + class MusteriManager + { + public void Ekle(Musteri musteri) + { + + Console.WriteLine("Müşteri Eklendi:" + musteri.Id + " " + musteri.AdSoyad); + + } + + public void Sil(Musteri musteri) + { + + Console.WriteLine(musteri.Id + " " + musteri.AdSoyad + " "+ "Kayıtlı Müsteri silindi."); + + } + + + } +} diff --git a/ClassMetotDemo/Program.cs b/ClassMetotDemo/Program.cs new file mode 100644 index 0000000..a933d6c --- /dev/null +++ b/ClassMetotDemo/Program.cs @@ -0,0 +1,43 @@ +using System; + +namespace ClassMetotDemo +{ + class Program + { + static void Main(string[] args) + { + Musteri musteri1 = new Musteri(); + musteri1.Id = 3301; + musteri1.AdSoyad = "Hilal Taşkıran"; + musteri1.TelefonNo = 05341234569; + musteri1.Adres = "Mersin"; + + Musteri musteri2 = new Musteri(); + musteri2.Id = 3302; + musteri2.AdSoyad = "Şehmuz Kabadayı"; + musteri2.TelefonNo = 05331234569; + musteri2.Adres = "Van"; + + + Musteri[] musteriler = new Musteri[] { musteri1, musteri2 }; + + foreach (var musteri in musteriler ) + { + Console.WriteLine(musteri.Id); + Console.WriteLine(musteri.AdSoyad); + Console.WriteLine(musteri.TelefonNo); + Console.WriteLine(musteri.Adres); + Console.WriteLine("***********************************"); + } + + MusteriManager musteriManager = new MusteriManager(); + musteriManager.Ekle(musteri1); + musteriManager.Ekle(musteri2); + musteriManager.Sil(musteri2); + + + + + } + } +}