Click here to Skip to main content
15,902,189 members
Home / Discussions / C#
   

C#

 
GeneralRe: How do I make a program that reacts to a specific word entered on the keyboard? Pin
Member 136547942-Feb-18 10:25
Member 136547942-Feb-18 10:25 
AnswerRe: How do I make a program that reacts to a specific word entered on the keyboard? Pin
OriginalGriff31-Jan-18 21:02
mveOriginalGriff31-Jan-18 21:02 
AnswerRe: How do I make a program that reacts to a specific word entered on the keyboard? Pin
Gerry Schmitz1-Feb-18 7:53
mveGerry Schmitz1-Feb-18 7:53 
QuestionIs it possible to make a class whose objects are castable into ints? Pin
arnold_w31-Jan-18 10:33
arnold_w31-Jan-18 10:33 
AnswerRe: Is it possible to make a class whose objects are castable into ints? Pin
Dave Kreskowiak31-Jan-18 11:24
mveDave Kreskowiak31-Jan-18 11:24 
GeneralRe: Is it possible to make a class whose objects are castable into ints? Pin
arnold_w6-Feb-18 0:25
arnold_w6-Feb-18 0:25 
QuestionRe: Is it possible to make a class whose objects are castable into ints? Pin
Eddy Vluggen31-Jan-18 13:15
professionalEddy Vluggen31-Jan-18 13:15 
AnswerRe: Is it possible to make a class whose objects are castable into ints? Pin
BillWoodruff5-Feb-18 18:51
professionalBillWoodruff5-Feb-18 18:51 
DaveK's post here is an excellent lesson in use of 'implicit operators: I up-voted it, and, so should you !

I wonder why you want to use such a technique, involving casting, boxing, when all you need is a simple integer field, or property, in the class ?
C#
public class MyClass
{
    // only set in the 'ctor
    public int Id { private set; get; }
    
    // 'ctor
    public MyClass(int id)
    {
       Id = id;
    }
}

«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12

GeneralRe: Is it possible to make a class whose objects are castable into ints? Pin
arnold_w6-Feb-18 0:34
arnold_w6-Feb-18 0:34 
Questionautomatic start, Pin
Member 1363217131-Jan-18 3:55
Member 1363217131-Jan-18 3:55 
AnswerRe: automatic start, Pin
OriginalGriff31-Jan-18 4:13
mveOriginalGriff31-Jan-18 4:13 
GeneralRe: automatic start, Pin
Member 1363217131-Jan-18 5:00
Member 1363217131-Jan-18 5:00 
GeneralRe: automatic start, Pin
OriginalGriff31-Jan-18 5:39
mveOriginalGriff31-Jan-18 5:39 
AnswerRe: automatic start, Pin
Richard MacCutchan31-Jan-18 6:08
mveRichard MacCutchan31-Jan-18 6:08 
AnswerRe: automatic start, Pin
Eddy Vluggen31-Jan-18 13:16
professionalEddy Vluggen31-Jan-18 13:16 
Questiontime task scheduler class Pin
Member 1363217131-Jan-18 2:46
Member 1363217131-Jan-18 2:46 
AnswerRe: time task scheduler class Pin
OriginalGriff31-Jan-18 2:53
mveOriginalGriff31-Jan-18 2:53 
GeneralRe: time task scheduler class Pin
Member 1363217131-Jan-18 2:57
Member 1363217131-Jan-18 2:57 
GeneralRe: time task scheduler class Pin
OriginalGriff31-Jan-18 3:07
mveOriginalGriff31-Jan-18 3:07 
GeneralRe: time task scheduler class Pin
Member 1363217131-Jan-18 3:14
Member 1363217131-Jan-18 3:14 
GeneralRe: time task scheduler class Pin
Pete O'Hanlon31-Jan-18 3:31
mvePete O'Hanlon31-Jan-18 3:31 
AnswerRe: time task scheduler class Pin
#realJSOP1-Feb-18 2:41
professional#realJSOP1-Feb-18 2:41 
GeneralRe: time task scheduler class Pin
Member 136321711-Feb-18 2:45
Member 136321711-Feb-18 2:45 
AnswerRe: time task scheduler class Pin
#realJSOP1-Feb-18 4:52
professional#realJSOP1-Feb-18 4:52 
GeneralRe: time task scheduler class Pin
Member 136321711-Feb-18 4:54
Member 136321711-Feb-18 4:54 

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.