Click here to Skip to main content
15,922,512 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi all,


i'm using 3-tier architecture,so have 3 classes like Class1,Class2 and Class3.

In class3,i'm loading the array value through properties which are difined in Class2.Now i want to retrive same value in class1.please reply with an example
Posted
Comments
R. Giskard Reventlov 3-Mar-11 7:35am    
Not so fast, buster. What have you already tried for yourself before you start asking for a solution?
Sunasara Imdadhusen 3-Mar-11 7:44am    
Did you try anything before that?
johannesnestler 3-Mar-11 9:01am    
This is a reply with example:
I'm using a smart-phone, so I have 3 classes like AI, SkyNet, space-ship. With AI I create SkyNet and control space ship - Now I want to take over the world.
I want to use it like in this EXAMPLE:
SkyNet sn = new SkyNet(aiMasterMind);
sn.TakeOverWorld(spaceshipBeamMeUp);

- please show US an EXAMPLE of your problem

Properties are supposed to be public. If Class3 has access to Class1, just use Class1's properties. (And having 3 classes doens't necessarily mean you're using a N-tier paradigm.)
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 3-Mar-11 12:47pm    
Yes, correct, my 5. (Would be a 5 for just the LOL. :-)
--SA
In class3,i'm loading the array value through properties which are difined in Class2.Now i want to retrive same value in class1.please reply with an example .

I guess your question itself has an answer.You say - Through properties of Class2, you are loading an array value in Class3.So, what is blocking you from using the same funda to load that array in Class1?

Its either you have mistaken somewhere or am out of my mind.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900