Click here to Skip to main content
15,917,062 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Is there a programming language... Pin
etkid8420-Dec-13 4:16
etkid8420-Dec-13 4:16 
GeneralRe: Is there a programming language... Pin
Ron Beyer20-Dec-13 4:29
professionalRon Beyer20-Dec-13 4:29 
QuestionRe: Is there a programming language... Pin
Pablo Aliskevicius17-Dec-13 4:45
Pablo Aliskevicius17-Dec-13 4:45 
AnswerRe: Is there a programming language... Pin
Marc Clifton17-Dec-13 5:06
mvaMarc Clifton17-Dec-13 5:06 
GeneralRe: Is there a programming language... Pin
Phil Martin17-Dec-13 4:46
professionalPhil Martin17-Dec-13 4:46 
GeneralRe: Is there a programming language... Pin
Marc Clifton17-Dec-13 5:07
mvaMarc Clifton17-Dec-13 5:07 
GeneralRe: Is there a programming language... Pin
Phil Martin17-Dec-13 11:37
professionalPhil Martin17-Dec-13 11:37 
GeneralRe: Is there a programming language... Pin
OriginalGriff17-Dec-13 5:11
mveOriginalGriff17-Dec-13 5:11 
Annoyingly, int is a sealed type in C#, or all you would have to do is provide the implicit cast operators:
C#
class AgeInYears : int
    {
    public static implicit operator AgeInYears(int i)
        {
        return (AgeInYears)i;
        }
    public static implicit operator int(AgeInYears a)
        {
        return (int)a;
        }
    }
But...what is an age plus an age? It's not really anything useful if you think about it. What you should be thinking of here is an Age plus a Timespan equals a DateTime, but then an Age can't really be assigned an integer value unless it already has a Datetime component - perhaps it is relative to the time at which the Age object is instantiated?

And don't forget that an Age is not a constant value: it will vary as the application runs... Laugh | :laugh:
GeneralRe: Is there a programming language... Pin
Marc Clifton17-Dec-13 5:17
mvaMarc Clifton17-Dec-13 5:17 
GeneralRe: Is there a programming language... Pin
Gary Wheeler17-Dec-13 7:08
Gary Wheeler17-Dec-13 7:08 
GeneralRe: Is there a programming language... Pin
OriginalGriff17-Dec-13 8:01
mveOriginalGriff17-Dec-13 8:01 
GeneralRe: Is there a programming language... Pin
Gary Wheeler17-Dec-13 8:05
Gary Wheeler17-Dec-13 8:05 
GeneralRe: Is there a programming language... Pin
Gary Wheeler17-Dec-13 6:53
Gary Wheeler17-Dec-13 6:53 
GeneralRe: Is there a programming language... Pin
Marc Clifton17-Dec-13 13:10
mvaMarc Clifton17-Dec-13 13:10 
GeneralRe: Is there a programming language... Pin
Rob Grainger17-Dec-13 22:31
Rob Grainger17-Dec-13 22:31 
GeneralRe: Is there a programming language... Pin
greydmar20-Dec-13 2:04
greydmar20-Dec-13 2:04 
GeneralRe: Is there a programming language... Pin
Rob Grainger20-Dec-13 3:38
Rob Grainger20-Dec-13 3:38 
GeneralRe: Is there a programming language... Pin
Gary Wheeler18-Dec-13 0:33
Gary Wheeler18-Dec-13 0:33 
GeneralRe: Is there a programming language... Pin
greydmar17-Dec-13 9:19
greydmar17-Dec-13 9:19 
GeneralRe: Is there a programming language... Pin
Marc Clifton18-Dec-13 1:41
mvaMarc Clifton18-Dec-13 1:41 
GeneralRe: Is there a programming language... Pin
greydmar20-Dec-13 1:59
greydmar20-Dec-13 1:59 
GeneralRe: Is there a programming language... Pin
HaBiX17-Dec-13 20:47
HaBiX17-Dec-13 20:47 
GeneralRe: Is there a programming language... Pin
kalberts17-Dec-13 22:34
kalberts17-Dec-13 22:34 
GeneralRe: Is there a programming language... Pin
Marc Clifton18-Dec-13 1:40
mvaMarc Clifton18-Dec-13 1:40 
GeneralRe: Is there a programming language... Pin
Rob Grainger17-Dec-13 22:48
Rob Grainger17-Dec-13 22:48 

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.