Click here to Skip to main content
15,917,177 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
let say if we have

C#
public partial class Login : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    public void Button1_Click(object sender, EventArgs e)
    {

    }



}


//and think if i have

C#
public class harversine
{

}

public class location
{

}



think now i want to get location values to class harversine
and i want to call harversine class in login class


can i do like this

C#
public partial class Login : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public void Button1_Click(object sender, EventArgs e)
    {
    harversine hvs = new harversine();
    add(hvs);

    }



}

//and think if i have

public class harversine : location
{

}

public class location
{

}



is it okay if i do like that?


please someone tell me?
Posted
Updated 7-Jul-13 19:35pm
v2
Comments
Sushil Mate 8-Jul-13 1:36am    
Yes you can do like that.

See this link you will get your answer :

How to create and use class in asp.net 3.5[^]

Accept as answer if help to you.
 
Share this answer
 
Comments
jaideepsinh 8-Jul-13 1:39am    
In my solution saw you same question as you ask then why you not first try that.
 
Share this answer
 

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