Click here to Skip to main content
12,074,763 members (58,239 online)
   

C#

 
GeneralRe: Tuples in Functions Pin
DaveyM6918-Aug-12 9:09
mentorDaveyM6918-Aug-12 9:09 
AnswerRe: Tuples in Functions Pin
Meysam Tolouee18-Aug-12 6:20
memberMeysam Tolouee18-Aug-12 6:20 
GeneralRe: Tuples in Functions Pin
DaveyM6918-Aug-12 9:15
mentorDaveyM6918-Aug-12 9:15 
GeneralRe: Tuples in Functions Pin
Meysam Tolouee18-Aug-12 10:53
memberMeysam Tolouee18-Aug-12 10:53 
AnswerRe: Tuples in Functions Pin
Keith Barrow18-Aug-12 10:38
mentorKeith Barrow18-Aug-12 10:38 
AnswerRe: Tuples in Functions Pin
BillWoodruff18-Aug-12 10:43
memberBillWoodruff18-Aug-12 10:43 
GeneralMy Vote of 5 Pin
Keith Barrow18-Aug-12 11:32
mentorKeith Barrow18-Aug-12 11:32 
GeneralRe: Tuples in Functions Pin
leppie18-Aug-12 22:37
memberleppie18-Aug-12 22:37 
While anonymous classes will not here, in this situation based on the amount of usage and 'decoration' required, a concrete class IMO would be a better option.

Remember you only have to write it once.

struct State
{
  public CheckState Value;
  public DateTime When;
  public string By;
  public decimal Amount;
}

A struct already implements hashcode and equality too.

Now imagine you need an extra field. In the case of a class/struct, no problem, but your Tuple will require changes across the board, even if you just add it to the end.

GeneralRe: Tuples in Functions Pin
BillWoodruff19-Aug-12 15:15
memberBillWoodruff19-Aug-12 15:15 
GeneralRe: Tuples in Functions Pin
leppie19-Aug-12 20:41
memberleppie19-Aug-12 20:41 
AnswerLeppie's interesting suggestion to use 'Anonymous Classes' ... Re: Tuples in Functions Pin
BillWoodruff18-Aug-12 16:49
memberBillWoodruff18-Aug-12 16:49 
GeneralRe: Leppie's interesting suggestion to use 'Anonymous Classes' ... Re: Tuples in Functions Pin
BobJanova20-Aug-12 2:00
memberBobJanova20-Aug-12 2:00 
QuestionTrying to Obtain Two (2) Values from Function Pin
computerpublic16-Aug-12 22:53
membercomputerpublic16-Aug-12 22:53 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
DaveyM6916-Aug-12 23:36
mentorDaveyM6916-Aug-12 23:36 
GeneralRe: Trying to Obtain Two (2) Values from Function Pin
BobJanova16-Aug-12 23:54
memberBobJanova16-Aug-12 23:54 
GeneralRe: Trying to Obtain Two (2) Values from Function Pin
Keith Barrow17-Aug-12 3:12
mentorKeith Barrow17-Aug-12 3:12 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
Sangramsingh Pawar17-Aug-12 1:43
memberSangramsingh Pawar17-Aug-12 1:43 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
V.17-Aug-12 4:16
memberV.17-Aug-12 4:16 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
Kuthuparakkal17-Aug-12 17:05
memberKuthuparakkal17-Aug-12 17:05 
QuestionHow to insert,update and edit data in datagridview window form Pin
Member 912701916-Aug-12 20:54
memberMember 912701916-Aug-12 20:54 
AnswerRe: How to insert,update and edit data in datagridview window form Pin
Calla16-Aug-12 21:53
memberCalla16-Aug-12 21:53 
GeneralRe: How to insert,update and edit data in datagridview window form Pin
Dave Kreskowiak17-Aug-12 4:37
mvpDave Kreskowiak17-Aug-12 4:37 
AnswerRe: How to insert,update and edit data in datagridview window form Pin
Uma Shankar Patel17-Aug-12 22:52
memberUma Shankar Patel17-Aug-12 22:52 
QuestionIs it possible to read windows password from registry? Pin
Mostafa M.A16-Aug-12 16:09
memberMostafa M.A16-Aug-12 16:09 
AnswerRe: Is it possible to read windows password from registry? Pin
Eddy Vluggen16-Aug-12 16:31
memberEddy Vluggen16-Aug-12 16:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.160208.1 | Last Updated 11 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid