C#'ta "Bankers Rounding" nasıl çalışır? #shorts



C#’ta, daha doğrusu .NET Framework içerisindeki temel “rounding” mekanizması olan “bankacı yuvarlaması” mantığına baktık. Bankalar bunu belirli hesaplamalarda kullandıkları için bu şekilde adlandırılıyor.

Math.Round(-0.4).Dump();
Math.Round(0.6).Dump();
Math.Round(1.4).Dump();
Math.Round(1.6).Dump();
Math.Round(1.5).Dump();
Math.Round(2.5).Dump();

-0
1
1
2
2
2

https://wiki.c2.com/?BankersRounding

#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