Click here to Skip to main content
15,918,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: P/Invoke problem in migrating 32 bit to 64bit application! Pin
Mike Dimmick15-Feb-08 0:25
Mike Dimmick15-Feb-08 0:25 
GeneralEquivalent to call in c#.net Pin
pekhaleyogesh14-Feb-08 21:43
pekhaleyogesh14-Feb-08 21:43 
GeneralRe: Equivalent to call in c#.net Pin
Christian Graus14-Feb-08 21:46
protectorChristian Graus14-Feb-08 21:46 
GeneralRe: Equivalent to call in c#.net Pin
pekhaleyogesh14-Feb-08 21:53
pekhaleyogesh14-Feb-08 21:53 
GeneralRe: Equivalent to call in c#.net Pin
Roger Alsing14-Feb-08 21:59
Roger Alsing14-Feb-08 21:59 
GeneralRe: Equivalent to call in c#.net Pin
pekhaleyogesh15-Feb-08 1:07
pekhaleyogesh15-Feb-08 1:07 
GeneralRe: Equivalent to call in c#.net Pin
N a v a n e e t h14-Feb-08 21:46
N a v a n e e t h14-Feb-08 21:46 
GeneralCasting and performance Pin
N a v a n e e t h14-Feb-08 21:33
N a v a n e e t h14-Feb-08 21:33 
I have a generic class "A" another generic interface "IInterface". I also have a derived class from "A". See the following code
class A<T>
{
    public void Save()
    {
         IInterface interface = (IInterface)new InterfaceImpl();
         interface.Save((T)this);
    }
}

class Derived : A<Derived>
{
}

class InterfaceImpl : IInterface<Derived>
{
     //This is interface method implementation
     public void Save(Derived instance)
     {
     }
}
As shown in the example, I need to call Save() method written inside the InterfaceImpl class. Is there any other way to do this without casting base class object to child class ? Is there any performance problem when base class object is casted into child class object ?

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

My Website | Ask smart questions

Generalprogress help Pin
abcomp0114-Feb-08 21:03
abcomp0114-Feb-08 21:03 
GeneralRe: progress help Pin
Christian Graus14-Feb-08 21:47
protectorChristian Graus14-Feb-08 21:47 
Questionstarting and stopping the sql server programaticaly Pin
Sonia Gupta14-Feb-08 19:42
Sonia Gupta14-Feb-08 19:42 
GeneralRe: starting and stopping the sql server programaticaly Pin
Giorgi Dalakishvili14-Feb-08 20:21
mentorGiorgi Dalakishvili14-Feb-08 20:21 
QuestionRe: starting and stopping the sql server programaticaly Pin
Sonia Gupta14-Feb-08 21:37
Sonia Gupta14-Feb-08 21:37 
GeneralRe: starting and stopping the sql server programaticaly Pin
N a v a n e e t h14-Feb-08 21:52
N a v a n e e t h14-Feb-08 21:52 
QuestionRe: starting and stopping the sql server programaticaly Pin
Sonia Gupta14-Feb-08 22:19
Sonia Gupta14-Feb-08 22:19 
GeneralRe: starting and stopping the sql server programaticaly Pin
Martin#14-Feb-08 22:37
Martin#14-Feb-08 22:37 
QuestionRe: starting and stopping the sql server programaticaly Pin
Sonia Gupta14-Feb-08 22:41
Sonia Gupta14-Feb-08 22:41 
GeneralRe: starting and stopping the sql server programaticaly Pin
DaveyM6914-Feb-08 22:55
professionalDaveyM6914-Feb-08 22:55 
QuestionRe: starting and stopping the sql server programaticaly Pin
Sonia Gupta14-Feb-08 22:59
Sonia Gupta14-Feb-08 22:59 
GeneralRe: starting and stopping the sql server programaticaly Pin
DaveyM6914-Feb-08 23:25
professionalDaveyM6914-Feb-08 23:25 
QuestionRe: starting and stopping the sql server programaticaly Pin
Sonia Gupta14-Feb-08 23:31
Sonia Gupta14-Feb-08 23:31 
AnswerRe: starting and stopping the sql server programaticaly Pin
Martin#14-Feb-08 23:44
Martin#14-Feb-08 23:44 
GeneralRe: starting and stopping the sql server programaticaly Pin
Sonia Gupta14-Feb-08 23:56
Sonia Gupta14-Feb-08 23:56 
GeneralRe: starting and stopping the sql server programaticaly Pin
Martin#14-Feb-08 23:59
Martin#14-Feb-08 23:59 
GeneralRe: starting and stopping the sql server programaticaly Pin
Mike Dimmick15-Feb-08 0:38
Mike Dimmick15-Feb-08 0:38 

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.