Click here to Skip to main content
15,889,826 members
Home / Discussions / C#
   

C#

 
SuggestionRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Richard MacCutchan21-May-14 21:59
mveRichard MacCutchan21-May-14 21:59 
GeneralRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Steven Richardson22-May-14 5:25
Steven Richardson22-May-14 5:25 
GeneralRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Richard MacCutchan22-May-14 6:28
mveRichard MacCutchan22-May-14 6:28 
GeneralRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Steven Richardson22-May-14 7:19
Steven Richardson22-May-14 7:19 
GeneralRe: How do you build a 1 click application that will alow you to change users using a smart card Pin
Richard MacCutchan22-May-14 7:21
mveRichard MacCutchan22-May-14 7:21 
Questionunity 2D C# coding problem Pin
Sepehr M21-May-14 9:00
Sepehr M21-May-14 9:00 
AnswerRe: unity 2D C# coding problem Pin
OriginalGriff21-May-14 9:13
mveOriginalGriff21-May-14 9:13 
QuestionPolymorphism In C# Pin
Member 1059122721-May-14 6:14
Member 1059122721-May-14 6:14 
When I have the following definitions:
C#
public class CMsg
{
    protected int m_Id;
}
public class CMsgTx : CMsg
{
    public string m_Dst;
}

To be used by:
C#
public abstract class CNet
{
    abstract public int SendMsg(ref CMsg oMsg);
}
public class CNetSend : CNet
{
    override public int SendMsg(ref CMsg oMsg)
    {
        CMsgTx oTxMsg = oMsg as CMsgTx;
        return 1;
    }
}

I getting compiler error when trying to call SendMsg:
C#
{...
CMsgTx oMsg = new CMsgTx();
CNetSend oSender = new CNetSend()
 oSender.SendMsg(ref oMsg); // Error! 
...}


My question is how to convert CMsgTx.oMsg to CMsg when calling SendMsg,
I thought that the compiler would do it...
AnswerRe: Polymorphism In C# Pin
OriginalGriff21-May-14 6:23
mveOriginalGriff21-May-14 6:23 
GeneralRe: Polymorphism In C# Pin
Member 1059122721-May-14 7:08
Member 1059122721-May-14 7:08 
GeneralRe: Polymorphism In C# Pin
OriginalGriff21-May-14 8:02
mveOriginalGriff21-May-14 8:02 
AnswerRe: Polymorphism In C# Pin
Eddy Vluggen21-May-14 9:40
professionalEddy Vluggen21-May-14 9:40 
QuestionMVC Pin
Pramod Singh (C)21-May-14 2:34
professionalPramod Singh (C)21-May-14 2:34 
AnswerRe: MVC Pin
Kornfeld Eliyahu Peter21-May-14 2:50
professionalKornfeld Eliyahu Peter21-May-14 2:50 
GeneralRe: MVC Pin
Pramod Singh (C)21-May-14 18:59
professionalPramod Singh (C)21-May-14 18:59 
AnswerRe: MVC Pin
Keith Barrow21-May-14 2:58
professionalKeith Barrow21-May-14 2:58 
GeneralRe: MVC Pin
Pramod Singh (C)21-May-14 18:57
professionalPramod Singh (C)21-May-14 18:57 
QuestionC# Pin
Pramod Singh (C)21-May-14 2:04
professionalPramod Singh (C)21-May-14 2:04 
AnswerRe: C# Pin
V.21-May-14 2:24
professionalV.21-May-14 2:24 
AnswerRe: C# PinPopular
Pete O'Hanlon21-May-14 2:29
mvePete O'Hanlon21-May-14 2:29 
GeneralRe: C# Pin
Richard MacCutchan21-May-14 22:04
mveRichard MacCutchan21-May-14 22:04 
GeneralRe: C# Pin
Pete O'Hanlon21-May-14 23:14
mvePete O'Hanlon21-May-14 23:14 
Questionsaving necessery point from a curve Pin
maysamfth20-May-14 18:56
maysamfth20-May-14 18:56 
AnswerRe: saving necessery point from a curve Pin
V.20-May-14 21:36
professionalV.20-May-14 21:36 
GeneralRe: saving necessery point from a curve Pin
maysamfth22-May-14 7:54
maysamfth22-May-14 7: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.