You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
i need to access string from one particular form in another form..
iam developing a windows application in c#..
need sumthing dat wud work like the way it worked in the good old easy days of VB !!!
lol
anand
Hi..
When we click the code, u must write... formname fr1=new formname();
Now u can pass the string variable in "new formname()" section just writing
formname fr1=new formname("My name is Subhendu");
Now open the code for formname i.e second form. Write a overloaded constructor for it & parameter wud b the string variable.
So when u invoke the second form, its string parameter version of constructor invoke and u can access that string variable.....