DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   different syntax for extending a class? (http://www.daniweb.com/forums/thread150241.html)

legend_018 Oct 9th, 2008 6:02 pm
different syntax for extending a class?
 
I was looking at a tutorial for when you extend a class. One tutorial said you used a keyword extends between the two class names and another tutorial said you used a period between the two class names to join the two classes together. Both of them are c# tutorials.

Not that it's a big deal, but are they both correct? They both seem to be decent tutorials for the most part. I'm sort of doing a side by side comparison with 2 tutorials. Sometimes one of the tutorials will explain something better than the other and vice versa.

Thanks in advance

selvaganapathy Oct 10th, 2008 12:15 am
Re: different syntax for extending a class?
 
Hi,

Quote:

One tutorial said you used a keyword extends between the two class names
In C#, we use colon ( : ) to extend from one class. Java language uses this extends keyword to inherit from a class.

If u have doubt like this, try it practically with these two types. You get the Answer

LizR Oct 10th, 2008 2:38 am
Re: different syntax for extending a class?
 
perhaps what you saw on the tutorial (link it if you could) was something where it was taking "myapp.myclass" and extending it.. where where myapp is the name space and myclass being the actual class being extended


All times are GMT -4. The time now is 9:07 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC