• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 227
  • Last Modified:

C# Class Method

If I have a (C# VS2008) class (object) with fields and methods (A), and those method instanciate another object (B) which has fields and methods ... how do I reference the (A) fields/methods from within a (B) method? And what if a method in the (B) object instanciates another object (C) and wants to reference the (A) object fields/methods ... what is the proper syntax?
0
mmexchange
Asked:
mmexchange
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you will have to pass the object (A) itself to the method (or a property) of (B) and (C) respectively.
you cannot access another object without "knowing" it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now