Created
September 6, 2017 12:03
-
-
Save Blind-Striker/4e7943e71993890130adb78055e63267 to your computer and use it in GitHub Desktop.
C# 7.0 example for blog article
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 Tuple<int, string, string, string> GetUserById(int userId) | |
{ | |
// TODO : verilerin datareader veya datatable'da geldiğini ve sonrasında Tuple nesnesini oluşturduğumuzu düşünün. | |
// (Evet ORM kullanılmadığımız bir projeydi) | |
var user = new Tuple<int, string, string, string>(1, "Deniz", "İrgin", "deniz@denizirgin.com"); | |
return user; | |
} | |
// -------- Kullanımı | |
Tuple<int, string, string, string> user = GetUserById(1); | |
user.Item1 | |
user.Item2; | |
user.Item3; | |
user.Item4; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment