Passing strings between forms c#.net

enginious

Newcomer
Joined
Jan 9, 2007
Messages
11
Hi,

I hope this is posted in the right place, but I'm just starting to use c#.net rather than VB6 and getting stuck on basic issues, or I am being an idiot.

In VB6 if I have on form Main a string called StrMine I can pass a value from another form by using Main.StrMine="myinfo", but for some reason C#.net wont let me do the same thing.

Is there a particular way I should be referencing this or am I just making a terrible hash of it. If you've got any advice I'd be grateful.

Cheers,
Sparky.
 
Thanks

Thanks for the links, I'll have a good read through both of them and see how I get on.

Thanks for taking the time to reply.
Sparky.
 
And, no, you aren't being an idiot. One of the biggest criticisms of VB6 is that it teaches "bad habits." It uses "dumbed down" and uncommon techniques that are not usually there in other languages, not even other versions of BASIC. 90% of these peculiarities were eliminated in VB.NET (and kept out of its close cousin, C#), but the end result is that it is significantly different which can pose a challenge. Good luck with the cross-over.
 
Back
Top