Click here to Skip to main content
15,914,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

Im working in .net windows based application.
Iam creating dll for each pages.but in those page i want to pass a value from frmmenuscreen to to those individual screens.How to pass values to dll.i cannot use like
frmmater obj_co=new frmmaster;   obj_co.obj = this;
error coming wile adding second line mainly this keyword.how to dothis

Thanks in advance
Posted
Updated 9-Mar-12 22:05pm
v2

1 solution

Hi,

your first invoke of frmmater is nearly right.
C#
frmmaster obj_co = new frmmaster();


Your second piece of code makes no sense for me.

Usually you use a own dll-File like this. You have to declare your method public to use from outside.

in your dll:
C#
public class Calculator
{
        public double Add(double val1, double val2)
        {
            return val1 + val2;
        }
}


Usage of this dll in anyone Form:

C#
Calculator.Calculator calc = new Calculator.Calculator();
MessageBox.Show(calc.Add(9, 6).ToString());


Best Regards
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900