Click here to Skip to main content
11,639,126 members (67,750 online)
   

C#

 
QuestionTuples in Functions Pin
computerpublic17-Aug-12 3:52
membercomputerpublic17-Aug-12 3:52 
AnswerRe: Tuples in Functions Pin
Wayne Gaylard17-Aug-12 4:37
mentorWayne Gaylard17-Aug-12 4:37 
GeneralRe: Tuples in Functions Pin
harold aptroot17-Aug-12 8:16
memberharold aptroot17-Aug-12 8:16 
AnswerRe: Tuples in Functions Pin
Ravi Bhavnani17-Aug-12 4:39
memberRavi Bhavnani17-Aug-12 4:39 
AnswerRe: Tuples in Functions Pin
DaveyM6917-Aug-12 22:21
mentorDaveyM6917-Aug-12 22:21 
GeneralRe: Tuples in Functions Pin
BillWoodruff18-Aug-12 7:17
memberBillWoodruff18-Aug-12 7:17 
GeneralRe: Tuples in Functions Pin
DaveyM6918-Aug-12 8:09
mentorDaveyM6918-Aug-12 8:09 
AnswerRe: Tuples in Functions Pin
Meysam Tolouee18-Aug-12 5:20
memberMeysam Tolouee18-Aug-12 5:20 
GeneralRe: Tuples in Functions Pin
DaveyM6918-Aug-12 8:15
mentorDaveyM6918-Aug-12 8:15 
GeneralRe: Tuples in Functions Pin
Meysam Tolouee18-Aug-12 9:53
memberMeysam Tolouee18-Aug-12 9:53 
AnswerRe: Tuples in Functions Pin
Keith Barrow18-Aug-12 9:38
mentorKeith Barrow18-Aug-12 9:38 
AnswerRe: Tuples in Functions Pin
BillWoodruff18-Aug-12 9:43
memberBillWoodruff18-Aug-12 9:43 
GeneralMy Vote of 5 Pin
Keith Barrow18-Aug-12 10:32
mentorKeith Barrow18-Aug-12 10:32 
GeneralRe: Tuples in Functions Pin
leppie18-Aug-12 21:37
memberleppie18-Aug-12 21: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 14:15
memberBillWoodruff19-Aug-12 14:15 
GeneralRe: Tuples in Functions Pin
leppie19-Aug-12 19:41
memberleppie19-Aug-12 19:41 
AnswerLeppie's interesting suggestion to use 'Anonymous Classes' ... Re: Tuples in Functions Pin
BillWoodruff18-Aug-12 15:49
memberBillWoodruff18-Aug-12 15:49 
GeneralRe: Leppie's interesting suggestion to use 'Anonymous Classes' ... Re: Tuples in Functions Pin
BobJanova20-Aug-12 1:00
memberBobJanova20-Aug-12 1:00 
QuestionTrying to Obtain Two (2) Values from Function Pin
computerpublic16-Aug-12 21:53
membercomputerpublic16-Aug-12 21:53 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
DaveyM6916-Aug-12 22:36
mentorDaveyM6916-Aug-12 22:36 
GeneralRe: Trying to Obtain Two (2) Values from Function Pin
BobJanova16-Aug-12 22:54
memberBobJanova16-Aug-12 22:54 
GeneralRe: Trying to Obtain Two (2) Values from Function Pin
Keith Barrow17-Aug-12 2:12
mentorKeith Barrow17-Aug-12 2:12 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
Sangramsingh Pawar17-Aug-12 0:43
memberSangramsingh Pawar17-Aug-12 0:43 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
V.17-Aug-12 3:16
memberV.17-Aug-12 3:16 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
Kuthuparakkal17-Aug-12 16:05
memberKuthuparakkal17-Aug-12 16:05 
QuestionHow to insert,update and edit data in datagridview window form Pin
Member 912701916-Aug-12 19:54
memberMember 912701916-Aug-12 19:54 
AnswerRe: How to insert,update and edit data in datagridview window form Pin
Calla16-Aug-12 20:53
memberCalla16-Aug-12 20:53 
GeneralRe: How to insert,update and edit data in datagridview window form Pin
Dave Kreskowiak17-Aug-12 3:37
mvpDave Kreskowiak17-Aug-12 3:37 
AnswerRe: How to insert,update and edit data in datagridview window form Pin
Uma Shankar Patel17-Aug-12 21:52
memberUma Shankar Patel17-Aug-12 21:52 
QuestionIs it possible to read windows password from registry? Pin
Mostafa M.A16-Aug-12 15:09
memberMostafa M.A16-Aug-12 15:09 
AnswerRe: Is it possible to read windows password from registry? Pin
Eddy Vluggen16-Aug-12 15:31
memberEddy Vluggen16-Aug-12 15:31 
GeneralRe: Is it possible to read windows password from registry? Pin
Mostafa M.A16-Aug-12 16:20
memberMostafa M.A16-Aug-12 16:20 
AnswerRe: Is it possible to read windows password from registry? Pin
Eddy Vluggen16-Aug-12 16:31
memberEddy Vluggen16-Aug-12 16:31 
AnswerMessage Removed Pin
Kuthuparakkal16-Aug-12 18:35
memberKuthuparakkal16-Aug-12 18:35 
GeneralRe: Is it possible to read windows password from registry? Pin
Eddy Vluggen16-Aug-12 23:35
memberEddy Vluggen16-Aug-12 23:35 
GeneralMessage Removed Pin
Kuthuparakkal17-Aug-12 2:12
memberKuthuparakkal17-Aug-12 2:12 
NewsRe: Is it possible to read windows password from registry? Pin
Eddy Vluggen17-Aug-12 2:49
memberEddy Vluggen17-Aug-12 2:49 
GeneralRe: Is it possible to read windows password from registry? Pin
Dave Kreskowiak17-Aug-12 3:36
mvpDave Kreskowiak17-Aug-12 3:36 
AnswerRe: Is it possible to read windows password from registry? Pin
harold aptroot17-Aug-12 3:41
memberharold aptroot17-Aug-12 3:41 
QuestionWhat is this C# console compile error and how do I fix it? Pin
Xarzu16-Aug-12 11:03
memberXarzu16-Aug-12 11:03 
AnswerRe: What is this C# console compile error and how do I fix it? Pin
jschell16-Aug-12 11:05
memberjschell16-Aug-12 11:05 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
Xarzu16-Aug-12 11:19
memberXarzu16-Aug-12 11:19 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
Wes Aday16-Aug-12 11:31
memberWes Aday16-Aug-12 11:31 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
Eddy Vluggen16-Aug-12 13:29
memberEddy Vluggen16-Aug-12 13:29 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
Eddy Vluggen16-Aug-12 13:31
memberEddy Vluggen16-Aug-12 13:31 
AnswerRe: What is this C# console compile error and how do I fix it? Pin
Bernhard Hiller16-Aug-12 21:19
memberBernhard Hiller16-Aug-12 21:19 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
OriginalGriff16-Aug-12 21:38
mvpOriginalGriff16-Aug-12 21:38 
AnswerRe: What is this C# console compile error and how do I fix it? Pin
OriginalGriff16-Aug-12 21:23
mvpOriginalGriff16-Aug-12 21:23 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
BobJanova16-Aug-12 22:51
memberBobJanova16-Aug-12 22:51 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
OriginalGriff16-Aug-12 23:41
mvpOriginalGriff16-Aug-12 23:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web02 | 2.8.150728.1 | Last Updated 31 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid