Objects and properties of properties

Okay, this should be an easy object oriented C# question, but for some reason I have been unable to find the answer yet.

I am creating an object of my own called JAddress. And basically I want to be able to do the following:
JAddress.ZipCode.Text
JAddress.ZipCode.MyId
I am unsure on how to create the second level of properties! Doing only a first level is really easy.....
public string ZipCode

{
get { return m_ZipCode; }
set { m_ZipCode = value; }
}
Does anyone know how to do this?
Thanks in advance,
csdietrich
0
csdietrich
7/16/2004 7:02:11 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

2 Replies
847 Views

Similar Articles

[PageSpeed] 13

You would have its own ZipCode type (class) which is exposed in JAddress via ZipCode property (which probably is read-only, depending how you expose ZipCode via JAddress). This ZipCode type would have those Text and MyId properties
Thanks,

Teemu Keiski
Finland, EU
0
joteke
7/16/2004 7:59:45 PM
I'm quite the novice at doing some of this object oriented stuff. Could someone provide me with a quick example of how to do what was explained? I've been trying it for a while, but I'm getting all mixed up in the private, public, protected syntax.

Thanks!
0
csdietrich
7/19/2004 9:39:39 PM
Reply:

Similar Artilces:

How to get all the properties of an Object?
Is it possible to get all the properties of a object? Thanks. > Is it possible to get all the properties of a object? Yes. Download the Web Matrix program, even if you don't care to use it as a code editor. In its installation folder (inside c:\Program Files\), you'll find ClassBrowser.exe. This Class Browser will show you all the Properties and all the Methods of every class in the .NET Framework. Even better, for every such member, it will provide a link to the online MSDN documentation so that you can find further information, including code samples.Alister What I re...

I want to setup property value in property page but there "Object reference not set to an instance of an object."
What is it? And how i can debug my controls? Hi, we would pretty much more information. What kind of is the property in question? Is it string, URL or what? You would be able to debug controls by having controls on separate Web Control Library project and then the actual consuming app on project that uses these controls (references the Web Control Library project). Put breakpoints on the code for your controls and run F5 in Visual Studio to start debugging (like you nornmally would). That's it.Thanks,Teemu KeiskiFinland, EU If you access childobjects of your custom control in th...

getting a property value when expression is used on property
Hi everyone, I'm using PB10.2.0.8011 on Windows XP. I hate asking fundamental questions for which I know the answer lies in a manual, but I am having a rough time finding the answer to my question. I initially created a computed column with expression: describe("day1.x"), which refers to a dw object's property which in itself has an expression defining the value. The result is as expected a value of the form value~texpression. So, I tried the following column expression to extract the actual value of x: describe("evaluate('day1.x'," + ...

How to bind a object'Property and this Property is a IList
 sorry for my poor englishclass Person{private IList<Email> emails;public IList<Email> Emails{get{...}set{...}} }class Email{    private long id;public long Id{get{..}set{...}}private string content;public string Content{get{}set{}}}and now I want to bind IList<Person> to a GridView and show person's emails in the Gridview can anyone help me?   You have to add a repeater in the Item Template field of the Gridview and Bind it's Datasource property to the Emails of the IList<Person>As like this<asp:GridView ID="GridView1&...

Getting all properties of an JS object
Does anyone know how to get all properties (name and value) within my C code of an object defined via JS_DefineProperties() in SpiderMonkey? Similarly, is there any way to get all properties (name and value) within my C code of an object defined via a JavaScript snippet within my JSContext, i.e. if I executed a snippet such as: a = new Object(); a.b = 1; a.c = "foo" Thanks, Alex Lee Alex Lee wrote: > Does anyone know how to get all properties (name and value) within my C > code of an object defined via JS_DefineProperties() in SpiderMonkey? It depend...

Getting properties of the OLE Object.
Hi All, Can anyone help me how to get the properties of an OLE object. For example, if I need to get the properties of Outlook Application object what should I have to do. Thanks in advance for any help, Regards, John Smith. You could either search the help on msdn.microsoft.com or open e.g. Excel and switch to the Visual Basic Editor (Tools -> Macros -> ). There add the Microsoft Outlook reference through Tools -> References. Open it through View -> Object Browser (F2). Now you can choose the outlook filter and browse the properties and methods. Regards ...

getting object properties
hi guys, im making a control that supports databinding, think of a drop down list. You can populate it something like thisDim objMyObjectCollection as MyObjCollection (System.Collections.CollectionBase object)objMyObjectCollection  = (a collection of the same object)ddl1.DataTextField = "PublicPropertyForText"ddl1.DataValueField="PublicPropertyForID"ddl1.DataSource = objMyObjectCollection  ddl1.databind()basically, what would happen in the databind method?how do you iterate through the objMyObjectCollection  items and read off their propertiesHope thats clearCheersAsh...

How to get properties for the Profile object?
I am trying this for some time now and I am not able to figure out how to get the properties which I set for the profile object. I have set my database and stuff and profile properties are inserting into the database fine but once they are in the database I cannot refer them or get the properties. Here is my Web.config file:<anonymousIdentification enabled="true" />    <profile enabled="true" defaultProvider ="ProfileSqlProvider">      <providers>        <add name="ProfileSqlProvider" type="System...

Getting the properties of in a object into an arraylist
 Hello,Does anyone know how to get all the properties(names) of an object into a array? regards, Philip www.value-investing.eu It is easier than you think:   C# public List<string> GetProperties(Type objectType) { List<string> propNames = new List<string>(); PropertyInfo[] propertyInfo = objectType.GetProperties(); foreach (PropertyInfo param in propertyInfo) { propNames.Add(param.Name); } return propNames; } VB: Public Function GetProperties(ByVal objectTy...

Property Accessing other properties
 hello i am new to asp.net and also c# and trying to learn some basic concepts now. I am reading article about the font propertyI am a little confused here. My question is Font property belong to WebControl class Font properties belong to FontUnit Class. How does the Font property access the font properties in the FontUnit ClassPlease if somebody could clarify this point for methanx Hi, As far as I can see, FontUnit represents the size of a font. So please look the following code.         Button bt = new Button(); // we create  a ...

Column Object enabled property through Properties window in PB8
Trying to find where I can place some validation logic on the enabled property of a column object in PB8 but can't seem to find enabled anywhere through the Properties window. Help file says there should be a checkbox on general tab but I don't see one. Anyone know where this is located? There is no enabled property. Take a look at the protect property. Brad Dennis Tucker wrote: > Trying to find where I can place some validation logic on > the enabled property of a column object in PB8 but can't > seem to find enabled anywhere through the Properties window....

Get objects and its properties from ObjectCycle
Hello, everyone: I try to write PB or ??? code to get Application Name, Folder(Library Name, and its properties from ObjectCycle. Do you have any idea? Thank you very much!!! ...

Set Label.Text property from aspx page with an object property
Hello, i would like to set a label text property with an object property. Neither this (or DateTime.Now.ToString()) is working: <asp:Label ID="temp" runat="server" Text='<%=Session("ActiveProfileId") Is Nothing%>' /> If you want to set this when the page loads, then you should do this in the page load event: <script runat="server">  void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Label1.Text = DateTime.Now.ToLongDateString(); } }</sc...

How to get the properties box to display properties while in source view mode?
The book shows that it's like automatically done and assumed that my VWD is set up to do this. I have never seen this working, can't figure out how to get the properties window to display properties via the pages source view. I have always seen it via details view.How can I enable this feature?   http://weblogs.asp.net/scottgu/archive/2006/12/19/html-source-editing-performance-improvements-in-vs-2005-sp1.aspx Remember to check "Show all settings" Regards,PrashantDont forget to click "Mark as Answer" on the post that helped you. Thank you so...

Web resources about - Objects and properties of properties - asp.net.getting-started

Properties of water - Wikipedia, the free encyclopedia
This article is about the physical and chemical properties of pure water. For general discussion and its distribution and importance in life, ...

Facebook Surpasses All Google Properties In Brazil
Facebook overtook Orkut to became Brazil’s top social network in January, but has only overtaken all of Google’s properties in that nation just ...

Extended Profile Properties - Facebook-Entwickler
These Permissions cannot be revoked in the Login Dialog during the login flow, meaning they are non-optional for Users when logging into your ...

PortPerry Properties (@brian14mckinlay) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Hawaii Real Estate Properties on the App Store on iTunes
Get Hawaii Real Estate Properties on the App Store. See screenshots and ratings, and read customer reviews.

32 properties resumed to start Kingsford Smith Drive widening project
Hundreds of residents and businesses along Kingsford Smith Drive &ndash; one of Brisbane's busiest roads &ndash; are about to feel the pressure ...

Properties pass in as 1000 auctions unfold after last week’s Melbourne Cup lull
Melbourne's declining real estate clearance rate was reflected by mixed auction results on Saturday.

One missing as bushfire threatens properties north of Lancefield, central Victoria
UPDATE: AN elderly man is missing as crews work to protect rural properties under threat from a 3000ha bushfire that continues to burn out of ...

Golden Mile a 'basketcase' as commercial properties lose value
Kings Cross will never again function as Sydney's late-night entertainment precinct, property owners say, with residential developers snapping ...

Lancefield bushfire: Home destroyed, properties under threat as bushfire burns in central Victoria
... in a fire burning out of control near Lancefield in central Victoria, the Country Fire Authority (CFA) says, warning that other homes and properties ...

Resources last updated: 11/27/2015 2:25:39 PM