By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,781 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,781 IT Pros & Developers. It's quick & easy.

Collections accessed like CollectionName.Property

P: n/a
Hi,

I'm not sure what this is called, or whether I can describe it properly,
but I'll give it a go!

I want to create a collection and be able to store values within the
collection like:

Temperature.Boiling = 100;
Temperature.Freezing = 0;
Temperature.Units = "Celcius";

and so on. Could someone tell me what this is called, and how it can be
achieved?

Thanks,

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
May 16 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Dylan Parry <us****@dylanparry.com> wrote:
I'm not sure what this is called, or whether I can describe it properly,
but I'll give it a go!

I want to create a collection and be able to store values within the
collection like:

Temperature.Boiling = 100;
Temperature.Freezing = 0;
Temperature.Units = "Celcius";

and so on. Could someone tell me what this is called, and how it can be
achieved?


Expando properties? Use JavaScript?

-- Barry
May 16 '06 #2

P: n/a
Dylan,

That's not a collection, that's just an object with properties (and by
the casing, it would seem to be a property on the type, a static property).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dylan Parry" <us****@dylanparry.com> wrote in message
news:u9**************@dylanparry.com...
Hi,

I'm not sure what this is called, or whether I can describe it properly,
but I'll give it a go!

I want to create a collection and be able to store values within the
collection like:

Temperature.Boiling = 100;
Temperature.Freezing = 0;
Temperature.Units = "Celcius";

and so on. Could someone tell me what this is called, and how it can be
achieved?

Thanks,

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references

May 16 '06 #3

P: n/a
Pondering the eternal question of "Hobnobs or Rich Tea?", Nicholas
Paldino [.NET/C# MVP] finally proclaimed:
That's not a collection, that's just an object with properties (and by
the casing, it would seem to be a property on the type, a static property).


Ah, fair enough. Thanks,

--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references

Listening to: Dream Theater - Funeral for a Friend \ Love Lies Bleeding
May 16 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.