473,385 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SharedProperty iteration

Hi,

I try to read out the Groupnames and Propertyvalues of
SharedProperties. With the SharedPropertyGroup I
have a IEnumeration object that let my iterate the different
groups and receive the Groupnames like this.

SharedPropertyGroupManager oManager = new SharedPropertyGroupManager();
System.Collections.IEnumerator iGroupEnum = oManager.GetEnumerator();
while(iGroupEnum.MoveNext()==true)
{
string groupName = iGroupEnum.Current.ToString();
}

But how can I receive the sharedproperties from a group-object without
having the name of the property?
Can someone give me a hind?

Ciao

Martin

Dec 8 '05 #1
4 1477
gl****@bigfoot.com wrote:
Hi,

I try to read out the Groupnames and Propertyvalues of
SharedProperties. With the SharedPropertyGroup I
have a IEnumeration object that let my iterate the different
groups and receive the Groupnames like this.

SharedPropertyGroupManager oManager = new
SharedPropertyGroupManager(); System.Collections.IEnumerator
iGroupEnum = oManager.GetEnumerator();
while(iGroupEnum.MoveNext()==true) {
string groupName = iGroupEnum.Current.ToString();
}

But how can I receive the sharedproperties from a group-object without
having the name of the property?
Can someone give me a hind?


I don't know why anyone would read a property without knowing the name
of the property. How can you ever know WHAT you want to read in taht
case? ;)

And what's SharedProperties?

FB

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Dec 9 '05 #2
Frans Bouma [C# MVP] schrieb:
I don't know why anyone would read a property without knowing the name
of the property. How can you ever know WHAT you want to read in taht
case? ;) Think about writing such kind of information down to an file and later
to read it in again ;-)
OK.
I just want to do that because I need it.
And what's SharedProperties?

An MVP should know first to have a look into the MSDN before writing
thinks like that.
It's part of the System.EnterpriseServices
There are 3 Klasses for managing shared informations.
SharedPropertyGroupManager, SharedPropertyGroup and SharedProperty

Please answer to this thread if you have qualified informations for me.
Not such thinks like Frans (sorry Frans)

Ciao and Thanks

Martin

Dec 9 '05 #3
gl****@bigfoot.com wrote:
Frans Bouma [C# MVP] schrieb:
I don't know why anyone would read a property without knowing the
name of the property. How can you ever know WHAT you want to read
in taht case? ;) Think about writing such kind of information down to an file and later
to read it in again ;-)
OK.
I just want to do that because I need it.


and I just want to help you but I need proper context information.
Your question read like "I want to read someobject.SomeProperty but I
don't know what 'Someproperty' is so how do I do that?"...
And what's SharedProperties?

An MVP should know first to have a look into the MSDN before writing
thinks like that.
It's part of the System.EnterpriseServices
There are 3 Klasses for managing shared informations.
SharedPropertyGroupManager, SharedPropertyGroup and SharedProperty


1) first learn what 'MVP' means. It's an award for people who have
done a lot for the community, not some course graduation diploma
2) there are literaly thousands of classes in the framework. I know a
lot of them from my bare head but not all of them. So please forgive me
that I didn't know that one from my bare head. And no, I'm not going to
look up every class name mentioned here in the .net reference manual to
see if it is a framework class or not. YOU want help, provide me with
info so I can help you.

For starters: trying to be funny and not being friendly towards a
person who might be able to help you isn't helping YOU either.
Please answer to this thread if you have qualified informations for
me. Not such thinks like Frans (sorry Frans)


Huh?
You don't want me to help you apparently. Listen Martin, I do this in
my spare time and I don't spend my spare time on helping people who
think they have to be unfriendly towards me, I've better things to do
with my spare time.

FB

ps: why doesn't SharedPropertyGroup.Property(name) work for you?

--
------------------------------------------------------------------------
Get LLBLGen Pro, productive O/R mapping for .NET: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
Dec 10 '05 #4
Hi Frans,

first, we had a unlucky start. I excuse me for my rude answer. OK?

I know what a MVP is and I'm not an starter. I thought SharedProperty
would be a well known term because it is a dotnet-framework keyword.

What I like to do is something that I can do, for example, with a
hashtable.
Think about using the hashtable to store String-Key and String-Values.
After I have inserted some Key-Value-pairs, I want to print out a list
with this key-value-pairs. For this the hastable gets an
iterator-object. OK?

I use the SharedProperties (and the Shared-PropertyGroups) in such a
way to
share information in my project.

So I make some groups and fill this groups with key (property-name) and

value (the value of the property) pairs. After this I want to have a
functionality
to print out the inserted group(names)-property(names) and Values.
For this I need a functionality to iterate over the group-items (that I
have) and
after this to iterate over the group-properties (that I don't have).

So I can not use SharedPropertyGroup.GetPropertyName(name) because I do
not know the name of the property. I also can not store propertynames
in an other variable because there is no permanet instance that can
hold this information.
SharedPropertyGroup.GetProperty((int) position) is also not working. I
always get
an exception that the index is wrong. I think that I have to create the
property with the
positions as key (or name) to have an access over the position to the
property.
But that is something that I do not want to do.

I hope you will still answer me ;-)

Thanks and Ciao

Martin

Dec 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
by: Raymond Hettinger | last post by:
Here is a discussion draft of a potential PEP. The ideas grew out of the discussion on pep-284. Comments are invited. Dart throwing is optional. Raymond Hettinger ...
59
by: Raymond Hettinger | last post by:
Please comment on the new PEP for reverse iteration methods. Basically, the idea looks like this: for i in xrange(10).iter_backwards(): # 9,8,7,6,5,4,3,2,1,0 <do something with i> The...
2
by: Abdullah Khaidar | last post by:
Is there any iteration style we must use to get faster processing time? I've tried with some style to concat number in list. But I still don't know which one is the recommended style. >>> def...
1
by: karthigan | last post by:
I am writing a simple hardware test program in C that would run from Windows command line. Inside one of the loops, I have this code fragment that would display the Iteration count. { .......
75
by: Sathyaish | last post by:
Can every problem that has an iterative solution also be expressed in terms of a recursive solution? I tried one example, and am in the process of trying out more examples, increasing their...
0
by: mkyrou | last post by:
Community > Programming Help > .NET crystal report and iteration mkyrou Junior Member 3 Posts Today 01:09 PM #1 crystal report and iteration
9
by: news.microsoft.com | last post by:
I am looping through an iteration and I would like to test the next item but if its not the one that I want how do I put it back so that when my foreach continues it is in the next iteration? ...
4
by: John A Grandy | last post by:
Is there a performance difference between forward iteration and reverse iteration through a List<string? for ( i = 0; i < myList.Count; i++ ) { // do work, such as forward iterate through a...
1
by: greyseal96 | last post by:
Hi, I am a pretty new programmer, so I apologize in andvance if this is a dumb question... In a book that I'm reading to learn C#, it says that when using a foreach() loop, a read-only copy of...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.