You can easily do it using
Properties in C#[
^].
Declare a Property in
harversine
class.
private string _End_Address;
public string End_Address
{
get { return _End_Address; }
set { _End_Address = value; }
}
Set it from login page. See this:
public void Button1_Click(object sender, EventArgs e)
{
harversine obj = new harversine();
obj.End_Address = TextBox2.Text;
}
You can access it in your
harversine
class:
public void SomeFunction()
{
if(End_Address != null)
string EndAdd = End_Address;
}
Refer the below link for more details:
C# Property[
^]
--Amit