C#'ta opsiyonel parametre kavramı #shorts



C#’ta metodlarda kullandığınız bazı parametreleri opsiyonel olarak tanımlayabilirsiniz.

void Main()
{
Sum(5).Dump();
Sum(5, 6).Dump();
}

int Sum(int a, int b = 42)
{
return a + b;
}

Kaynak: https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/named-and-optional-arguments#optional-arguments

#shorts #csharp

***

🤖 LEETCODE ► https://www.youtube.com/playlist?list=PL7rvg7Sao02shXDj-yaczfZFnAF_EH_CO
💚 HACKERRANK ► https://www.youtube.com/playlist?list=PL7rvg7Sao02u0PYyUHT6ItQYZFua4ilDa
👌 HACKERRANK- 30 DAYS OF CODE ► https://www.youtube.com/playlist?list=PL7rvg7Sao02s2niCrdzsPEB9qzGXpIfic
🎁 C# YENİLİKLERİ ► https://www.youtube.com/playlist?list=PL7rvg7Sao02t3bq68IjUYQIJjGrCC4x_I
💜 SIFIRDAN C# PROGRAMLAMA EĞİTİMİ ► https://www.youtube.com/playlist?list=PL7rvg7Sao02tAU3waXR3yHJP5xXQJOQg7
🔆 C# SHORTS ► https://www.youtube.com/playlist?list=PL7rvg7Sao02udZJq0X8uN4iYFoMh_Wu-O
💛 CODECADEMY EĞİTİMLERİ ► https://www.youtube.com/playlist?list=PL7rvg7Sao02uGMavl-Mnu_LPVAWsYVmov
🎨 .NET YENİLİKLERİ ► https://www.youtube.com/playlist?list=PL7rvg7Sao02seXLs_OXXo3vuGeJDoMwAE
⭐ .NET MAUI VİDEOLARI ► https://www.youtube.com/playlist?list=PL7rvg7Sao02sejh8YACKhr-vvigoNXmCF
🎖️ VISUAL STUDIO VİDEOLARI ► https://www.youtube.com/playlist?list=PL7rvg7Sao02s06i0_oceNQDCuE7qbZNmR
🎉 BENCHMARKDOTNET VİDEOLARI ► https://www.youtube.com/playlist?list=PL7rvg7Sao02tnVUKp6ZhW34mV3EIIShIQ
✨ ALGORİTMA VİDEOLARI ► https://www.youtube.com/playlist?list=PL7rvg7Sao02ue_QyrgO6-qdVDJeDUiAdd

🐦 Twitter’dan takip edin ► https://twitter.com/sonergonul
💜 Twitch’ten takip edin ► https://www.twitch.tv/sonergonul
💚 Discord kanalımız ► https://discord.gg/VXZQH3U
💖 Quora’dan takip edin ► https://www.quora.com/profile/Soner-Gonul
💛 Instagram’dan takip edin ► https://www.instagram.com/sonergonul/
✨ Tiktok’tan takip edin ►https://www.tiktok.com/@soner_gonul

💪 KATIL: https://www.youtube.com/channel/UCFTgwm0NW2Ay2c422bcu4xg/join

Comments are closed.