Re: What replace "this" in static class?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Originally, your class, as a derived class of QuickFix.Application,
held within it an instance of QuickFix.Application. Now that it's is a
static class, this relationship is broken.

It fix this, you must make explicit what was previous implict. Your
class can no longer derive from QuickFix.Application (as this relationship
is meaningless when one is a static class and the other is an instance
class), but should contain a explicit QuickFix.Application member.

--
Truth,
James Curran
[erstwhile VC++ MVP]

Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
"Marty" <xmarty99@xxxxxxxxxxx> wrote in message
news:urElf.138488$y_1.49549@xxxxxxxxxxx
> Hi,
>
> I have a class that I modified to be static. It is now a public sealed
> class and all function are static, no more constructor but a init()
> function to do the constructor job.
>
> This class inherit from a QuickFix.Application class. I have this object:
> private static SocketInitiator qfxInitiator;
>
> When instantiated, its constructor need a "QuickFix.Application" object.
> And previously I was using "this" keyword because the class inherit
> from "QuickFix.Application", but now that the class is static, is there
> a keyword to point at this static class?
>
> Thank you :)
> Marty


.



Relevant Pages

  • Re: What replace "this" in static class?
    ... the protected static fields of the parent class. ... > function to do the constructor job. ... > This class inherit from a QuickFix.Application class. ... > And previously I was using "this" keyword because the class inherit from ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Whats best practice--instantiate in the constructor or outside it for collection class?
    ... See my code as posted--I expected when .ToString was run for the ... 'virtual' keyword to mean that the derived class values of the ... i that was outside the constructor, ... with one other keyword that escapes me at the moment). ...
    (microsoft.public.dotnet.languages.csharp)
  • What replace "this" in static class?
    ... It is now a public sealed class and all function are static, no more constructor but a initfunction to do the constructor job. ... And previously I was using "this" keyword because the class inherit from "QuickFix.Application", but now that the class is static, is there a keyword to point at this static class? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: getting used to Java - question about "style"
    ... > I am reading a book that a collegue gave me called "The Elements of Java ... > before executing the derived class constructors. ... > constructor." ... void print() { ...
    (comp.lang.java.programmer)
  • :: Scope qualifier misunderstanding.
    ... arguments from the derived constructor). ... I was hoping this would set the values in the derived class using the ... (inherits base2). ... // Base 2 declaration, ...
    (comp.lang.cpp)