Re: [General]acces of members of subclass



Mark Space wrote:
Daniel Moyne wrote:

public class My_Other_Class extends My_Class{
public method_3 {}
public method_4 {}
public int w;
public String z;
}

How can I access public members w and z once I have done this :
My_Class aa=new My_Other_Class();

if( aa instanceof My_Other_Class ) {
int x = (My_Other_Class)aa.w;

ITYM `((My_Other_Class)aa).w'.

}

--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxxx
.



Relevant Pages

  • Re: [General]acces of members of subclass
    ... Daniel Moyne wrote: ... How can I access public members w and z once I have done this: ...
    (comp.lang.java.help)
  • Re: RasEnumEntries returns only 1 dial up entry (PocketPC)
    ... public int reserved1 = 0; ... public string szPhoneNumber; ... public extern static uint RasHangUp( ... // buffer to hold error string ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: how to declare GetOpenFileNameEx in C#
    ... public IntPtr hwndOwner; ... public string lpstrCustomFilter; ... public int nMaxCustFilter; ... public IntPtr lpstrFile; ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: WNetAddConnection2
    ... I managed to recreate my error from the command prompt with the following ... So I got to thinking about the username and tried ... ... public int dwScope; ... public string lpRemoteName; ...
    (microsoft.public.dotnet.framework.interop)
  • Re: Which generic?
    ... public string description; ... static void Main ... foreach(Column col in myCols) ... public int IndexOf{ ...
    (microsoft.public.dotnet.languages.csharp)