Skip to content

Instantly share code, notes, and snippets.

@Blind-Striker
Created September 6, 2017 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blind-Striker/4e7943e71993890130adb78055e63267 to your computer and use it in GitHub Desktop.
Save Blind-Striker/4e7943e71993890130adb78055e63267 to your computer and use it in GitHub Desktop.
C# 7.0 example for blog article
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