Created
September 6, 2017 12:19
-
-
Save Blind-Striker/e31d7cb55be44f577d680ce53877e9fd to your computer and use it in GitHub Desktop.
New out example for blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void UpdateUserBalance(int userId, string balance) // harici bir sistemden gelen string data | |
{ | |
if (decimal.TryParse(balance, out decimal userBalance)) // decimal yerine var'da kullanabiliriz | |
{ | |
Console.WriteLine($"{userId} id'li kullanıcının bakiyesi {userBalance}"); | |
} | |
else | |
{ | |
Console.WriteLine("Geçerisiz bir değer girildi"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment