| | |
including class???
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
this may help:
http://www.csharp-station.com/Tutorials/Lesson07.aspx
http://www.csharp-station.com/Tutorials/Lesson07.aspx
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
here we are creating the object of the class, i guess so...
but i want to call the functions directly without declaring the object of that class.
see:
i have two classes named class1, class2.
class1 have two functions
c1f1
c1f2
class2 also have two functions
c2f1
c2f2
here is the third class3
which i want to call these functions
eg:
public class class3:class1
{
public constructor()
{
}
public void c3f1()
{
int a=c1f1(); // here i m calling function c1f1defining in class1 without creating the object of the class1
}
}
now i want to use the function defining in the class2( in the same manner-- without creating the object of the class2)
how can i do???
but i want to call the functions directly without declaring the object of that class.
see:
i have two classes named class1, class2.
class1 have two functions
c1f1
c1f2
class2 also have two functions
c2f1
c2f2
here is the third class3
which i want to call these functions
eg:
public class class3:class1
{
public constructor()
{
}
public void c3f1()
{
int a=c1f1(); // here i m calling function c1f1defining in class1 without creating the object of the class1
}
}
now i want to use the function defining in the class2( in the same manner-- without creating the object of the class2)
how can i do???
Thanks & Regards
Umang
Umang
right at the top of code under your 'using......' statements:
namespace whatever
{
your code
}
now do that to all your classes. then each class can call methods from other classes (you have to specify which, where and when) also ensure methods are public
namespace whatever
{
your code
}
now do that to all your classes. then each class can call methods from other classes (you have to specify which, where and when) also ensure methods are public
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
lol ok no worries.
namespace whatever
{
class1
your code
}
namespace whatever
{
class2
your code
}
namespace whatever
{
class3
your code
}
namespace whatever
{
class1
your code
}
namespace whatever
{
class2
your code
}
namespace whatever
{
class3
your code
}
Last edited by majestic0110; Feb 7th, 2008 at 9:15 am. Reason: typo
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
![]() |
Similar Threads
- Cannot open certain websites, including hotmail (Web Browsers)
- class rectangle (Java)
- Please Help Header Error (PHP)
- C++ CString Class Help! (C++)
- Instantiating class objects?? (C++)
- help with "disabling" a button (C)
- Y would something compile from a hard drive fine but from on a disk? (Java)
- "missing storage-class or type specifiers" error (C++)
- struct type redefinition (C++)
Other Threads in the ASP.NET Forum
- Previous Thread: Help:Does not support loopback URL problem
- Next Thread: problem
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox click commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu dynamically edit expose fill flash flv formatdecimal forms formview gridview homeedition iframe iis javascript jquery listbox login menu microsoft mono mouse mssql multistepregistration news numerical objects opera order panelmasterpagebuttoncontrols radio ratings registration reportemail rotatepage save schoolproject search security serializesmo.table silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers






