Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
AnswerRe: cue banner not working Pin
Richard Andrew x6417-Aug-12 8:04
professionalRichard Andrew x6417-Aug-12 8:04 
GeneralRe: cue banner not working Pin
Wes Aday17-Aug-12 8:28
professionalWes Aday17-Aug-12 8:28 
AnswerRe: cue banner not working Pin
Richard Andrew x6417-Aug-12 8:18
professionalRichard Andrew x6417-Aug-12 8:18 
QuestionTuples in Functions Pin
computerpublic17-Aug-12 3:52
computerpublic17-Aug-12 3:52 
AnswerRe: Tuples in Functions Pin
Wayne Gaylard17-Aug-12 4:37
professionalWayne Gaylard17-Aug-12 4:37 
GeneralRe: Tuples in Functions Pin
harold aptroot17-Aug-12 8:16
harold aptroot17-Aug-12 8:16 
AnswerRe: Tuples in Functions Pin
Ravi Bhavnani17-Aug-12 4:39
professionalRavi Bhavnani17-Aug-12 4:39 
AnswerRe: Tuples in Functions Pin
DaveyM6917-Aug-12 22:21
professionalDaveyM6917-Aug-12 22:21 
You have the answer to your question, this is just a comment regarding the casing of your parameters, variables etc.

There are some generally accepted rules for casing which makes code at a glance easier to read and understand. See here[^]. It is not normally recommended to use underscores, they don't add any clarity, and abbreviations are discouraged.

Taking the above into consideration your code would look like this:
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestingFunctions
{
    class Program
    {
        public static Tuple<double, double> Test(double value1, double value2, double value3)
        {
            double result1 = value1 + value2 + value3;
            double result2 = 7;
            return new Tuple(result1, result2);
        }
        static void Main(string[] args)
        {
            double a = 1, b = 2, c = 3;
            Tuple result = Test(a, b, c);
            Console.WriteLine("{0}", result);
        }
    }
}

This makes no difference to the execution of the code, it is just a personal (or company if you code professionaly) matter of style. There are also many differing opinions on some finer points!
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: Tuples in Functions Pin
BillWoodruff18-Aug-12 7:17
professionalBillWoodruff18-Aug-12 7:17 
GeneralRe: Tuples in Functions Pin
DaveyM6918-Aug-12 8:09
professionalDaveyM6918-Aug-12 8:09 
AnswerRe: Tuples in Functions Pin
WebMaster18-Aug-12 5:20
WebMaster18-Aug-12 5:20 
GeneralRe: Tuples in Functions Pin
DaveyM6918-Aug-12 8:15
professionalDaveyM6918-Aug-12 8:15 
GeneralRe: Tuples in Functions Pin
WebMaster18-Aug-12 9:53
WebMaster18-Aug-12 9:53 
AnswerRe: Tuples in Functions Pin
Keith Barrow18-Aug-12 9:38
professionalKeith Barrow18-Aug-12 9:38 
AnswerRe: Tuples in Functions Pin
BillWoodruff18-Aug-12 9:43
professionalBillWoodruff18-Aug-12 9:43 
GeneralMy Vote of 5 Pin
Keith Barrow18-Aug-12 10:32
professionalKeith Barrow18-Aug-12 10:32 
GeneralRe: Tuples in Functions Pin
leppie18-Aug-12 21:37
leppie18-Aug-12 21:37 
GeneralRe: Tuples in Functions Pin
BillWoodruff19-Aug-12 14:15
professionalBillWoodruff19-Aug-12 14:15 
GeneralRe: Tuples in Functions Pin
leppie19-Aug-12 19:41
leppie19-Aug-12 19:41 
AnswerLeppie's interesting suggestion to use 'Anonymous Classes' ... Re: Tuples in Functions Pin
BillWoodruff18-Aug-12 15:49
professionalBillWoodruff18-Aug-12 15:49 
GeneralRe: Leppie's interesting suggestion to use 'Anonymous Classes' ... Re: Tuples in Functions Pin
BobJanova20-Aug-12 1:00
BobJanova20-Aug-12 1:00 
QuestionTrying to Obtain Two (2) Values from Function Pin
computerpublic16-Aug-12 21:53
computerpublic16-Aug-12 21:53 
AnswerRe: Trying to Obtain Two (2) Values from Function Pin
DaveyM6916-Aug-12 22:36
professionalDaveyM6916-Aug-12 22:36 
GeneralRe: Trying to Obtain Two (2) Values from Function Pin
BobJanova16-Aug-12 22:54
BobJanova16-Aug-12 22:54 
GeneralRe: Trying to Obtain Two (2) Values from Function Pin
Keith Barrow17-Aug-12 2:12
professionalKeith Barrow17-Aug-12 2:12 

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.