Re: Access innerclass variable

From: Petterson Mikael (mikael.petterson_at_era.ericsson.se)
Date: 05/03/04


Date: Mon, 03 May 2004 09:56:53 +0200

Hi,

Thanks for replies. I have a third class where I want to access

aNumber ( I know it would be better with get/set) but I I need help
how to access a member in inner class from another class.

All help appreciated!

BR

//Mikael

AccessClass{

public int accessAnumber(){
        //access aNumber here!
}

}

-----------------------------

}

public class OuterClass
{
  public class InnerClass
  {
    public InnerClass()
    {
       
    }

   public int aNumber = 2;
   
  }
 }



Relevant Pages

  • Re: Using properties from a nested class
    ... public class OuterClass ... public class InnerClass ... public InnerClass MyInnerClass ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Access innerclass variable
    ... I have a third class where I want to access ... > aNumber but I I need help ... > AccessClass{ ... > public class OuterClass ...
    (comp.lang.java.help)
  • Re: noob using dictionary as class property ?
    ... public class SampleClass ... public IDictionaryMyProperty ... use a property to get/set the key/value of the dictionary but I'm ...
    (microsoft.public.dotnet.languages.csharp)
  • Stupid error with get/set on properties
    ... I get stuck on the "set" ... public class Start ... definition of get/set as: ... Either i'm slow or blind, ...
    (microsoft.public.dotnet.languages.csharp)