Click here to Skip to main content
15,435,743 members
Home / Discussions / C#
   

C#

 
QuestionHow do I convert an XLS document to XML in C#? Pin
asdxxxx8-Mar-10 4:02
Memberasdxxxx8-Mar-10 4:02 
AnswerRe: How do I convert an XLS document to XML in C#? Pin
Not Active8-Mar-10 4:09
mentorNot Active8-Mar-10 4:09 
GeneralRe: How do I convert an XLS document to XML in C#? Pin
asdxxxx8-Mar-10 4:17
Memberasdxxxx8-Mar-10 4:17 
GeneralRe: How do I convert an XLS document to XML in C#? Pin
Keith Barrow8-Mar-10 4:19
professionalKeith Barrow8-Mar-10 4:19 
GeneralRe: How do I convert an XLS document to XML in C#? Pin
asdxxxx8-Mar-10 4:45
Memberasdxxxx8-Mar-10 4:45 
GeneralRe: How do I convert an XLS document to XML in C#? Pin
Keith Barrow8-Mar-10 5:30
professionalKeith Barrow8-Mar-10 5:30 
GeneralRe: How do I convert an XLS document to XML in C#? Pin
asdxxxx8-Mar-10 20:26
Memberasdxxxx8-Mar-10 20:26 
Questionforce ToString() override in Deriv classed (already having a Base class) Pin
George Nistor8-Mar-10 3:49
MemberGeorge Nistor8-Mar-10 3:49 
Hi ...first problem in C# Smile | :)

Basically I have a Base class and multiple derivs from Base.
All derivs are part of a Tree, so the mytree has somthing like CNode<CBase>

Now my question is is any way to make (force), override ToString() in my derivs class.

I will keep my all derivs class derived from Base.
so I can't use another abstract class and derive from this also.

I guess the only way is true by another interface, but how do I do this?

(if I put a simple interface and having func replaced with another func..mToString() -> this will be virtual in my Base and make derivs:INewInterface {string mToString()} doesn't work either because the compiller will consider having definition from Base )

thx

interface IBase
{
string ToString();
}

class CBase
{
public override string ToString()
{
return "Base";
}
}
class CDeriv1 : CBase, IBase
{
public override string ToString()
{
return "Deriv1";
}
}
class Program
{
static void Main(string[] args)
{
CBase nod = new Deriv1();

}
}
AnswerRe: force ToString() override in Deriv classed (already having a Base class) Pin
Keith Barrow8-Mar-10 4:01
professionalKeith Barrow8-Mar-10 4:01 
AnswerRe: force ToString() override in Deriv classed (already having a Base class) Pin
Not Active8-Mar-10 4:05
mentorNot Active8-Mar-10 4:05 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
Keith Barrow8-Mar-10 4:13
professionalKeith Barrow8-Mar-10 4:13 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
Not Active8-Mar-10 4:20
mentorNot Active8-Mar-10 4:20 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
George Nistor8-Mar-10 6:49
MemberGeorge Nistor8-Mar-10 6:49 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
Keith Barrow8-Mar-10 6:58
professionalKeith Barrow8-Mar-10 6:58 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
George Nistor8-Mar-10 7:26
MemberGeorge Nistor8-Mar-10 7:26 
GeneralRe: force ToString() override in Deriv classed (already having a Base class) Pin
George Nistor8-Mar-10 7:34
MemberGeorge Nistor8-Mar-10 7:34 
AnswerRe: force ToString() override in Deriv classed (already having a Base class) Pin
PIEBALDconsult8-Mar-10 6:57
professionalPIEBALDconsult8-Mar-10 6:57 
QuestionReturn Week Number of the Current Month Pin
codeproject_Tarun8-Mar-10 3:32
Membercodeproject_Tarun8-Mar-10 3:32 
AnswerRe: Return Week Number of the Current Month Pin
kevinnicol8-Mar-10 3:46
Memberkevinnicol8-Mar-10 3:46 
AnswerCross-post Pin
Kristian Sixhøj8-Mar-10 4:02
MemberKristian Sixhøj8-Mar-10 4:02 
QuestionRegarding deployment of windows service Pin
Håkan Axheim8-Mar-10 2:37
MemberHåkan Axheim8-Mar-10 2:37 
AnswerMessage Closed Pin
8-Mar-10 4:00
Memberstancrm8-Mar-10 4:00 
GeneralRe: Regarding deployment of windows service Pin
Håkan Axheim8-Mar-10 4:04
MemberHåkan Axheim8-Mar-10 4:04 
GeneralMessage Closed Pin
8-Mar-10 4:13
Memberstancrm8-Mar-10 4:13 
GeneralRe: Regarding deployment of windows service Pin
Håkan Axheim8-Mar-10 9:30
MemberHåkan Axheim8-Mar-10 9:30 

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.