🙂 İNSANLARIN EN HAYIRLISI INSANLARA FAYDALI OLANDIR 🙂

Burak HABER / C# / Sınıf İçinde Geriye Değer Döndürmeyen Metotlar 2

1-) C# - Sınıf İçinde Geriye Değer Döndürmeyen Metotlar 2

Not

C
onsole'ye girilen ismi 10 kere yazdırır.



Program.cs
using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

namespace Ornek_Console

{

    class Program

    {

        static void Main(string[] args)

        {

            Kisiler ks = new Kisiler();

            string ads;

            Console.Write("İsim Giriniz:");

            ads = Console.ReadLine();

            ks.kisilistesi(ads);

            Console.Read();

        }

    }

}



Kisiler.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

namespace Ornek_Console

{

    class Kisiler

    {

        public void kisilistesi(string adsoyad)

        {

            for (int i = 1; i <= 10; i++)

            {

                Console.WriteLine(adsoyad);

            }

        }

 

    }

}

 

 2021 Mart 11 Perşembe
 351