Cannot reference initialized object from another project into form project

RaeiRaei

New member
Joined
Mar 30, 2016
Messages
2
Programming Experience
1-3
[SOLVED] just tested some other projects with child classes. Objects and MessageBox.Show() method can (of course?) be accessed under both child class methods and Form Objects, if the project namespaces have enough correct references added + correct "using.X;" statements at the top!

Hello, just started boxing with C# and having quite the trouble migrating from VB to C#. Pardon my ignorance, I could not seem to find a thread that made sense to my (newbie) situation of improper object referencing regarding already succesful initialized objects.

See attached screen dumps below of my hopeless attempt of referencing the namespace Classes, class Player (newly created object) from the RPG namespace Character Creation Form's click button event to show a messagebox of the created character. In the first reply I've included a screen dump of the Player class.

I have added references from RPG --> Classes, included "using Classes;" + "using Logic;" - I tried fiddling around with "public" and "static" on the classes/objects/whatnot, but have no luck with that.

If there are "101 like" ways to do proper referencing that greenhorns like me understand, please do share. :) (never mind the "player" part of the MessageBox.Show() method - it threw the same error at me when I was doing 'player.Name')

1.png2.png
 
Last edited:
Back
Top Bottom