[Mono-list] Accessing one class from another
BinaryFlow
hamburgerstring at googlemail.com
Tue Dec 9 16:36:24 EST 2008
Paul F. Johnson wrote:
>
> Hi,
>
> I have an application which is causing me a small headache (too much
> code, not enough rest syndrome!).
>
> I have two files - mainform.cs which contains code for dealing with the
> main winform. In the second file called xmlhander.cs, I have a class
> called xmlhander.
>
> In mainform.cs, I have a public class called Mainform. In this I have
>
> public Mainform()
> {
> this.InitializeComponent();
> reset();
> }
>
> then code.
>
> I can access everything defined in Mainform from other classes by just
> creating a new instance of it. Easy enough. Mainform mf = new
> Mainform();
>
> In xmlhandler.cs, I have a public class called xmlhandler(). In this I
> have
>
> public xmlhandler() {}
>
> However, if I try and create an instance of xmlhandler within Mainform
> (same way : xmlhandler xml = new xmlhandler();), I get the following
> error (from monodevelop - my other thread holds, I'm editing using emacs
> and building via monodevelop)
>
> Line 30 : The type or namespace name `xmlhandler' could not be found.
> Are you missing a using directive of assembly reference? (CS0246)
>
> All source is in the same namespace (marker).
>
> Any help on this would be appreciated.
>
> TTFN
>
> Paul
>
> --
> Sie können mich aufreizen und wirklich heiß machen!
>
>
>
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>
Hi there, i'm having the same problem trying to use one of my own classes
sitting in the same namespace as the rest of my project. I've tried googling
for the a solution but to no avail :(
--
View this message in context: http://www.nabble.com/Accessing-one-class-from-another-tp17020735p20924155.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list
mailing list